Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(material-experimental/theming): checkbox theme customization #28762

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wagnermaciel
Copy link
Contributor

@wagnermaciel wagnermaciel commented Mar 21, 2024

Example usage:

html {
    @include mat.all-component-themes($light-theme, (
        checkbox: (
            selected-checkmark-color: blue,
        )
    ));
}

Alternate usage:

html {
    @include mat.checkbox-theme($light-theme, (
      selected-checkmark-color: blue,
    ));
}

Notes about the API:

  • An error is thrown if a user passes in a token that does not exist in either the m2/mat or m2/mdc.
  • Prefixes are determined automagically for the user based on whether the token exists in the m2/mat or m2/mdc tokens.

@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Mar 21, 2024
@@ -31,9 +33,13 @@
/// @param {ArgList} Additional optional arguments (only supported for M3 themes):
/// $color-variant: The color variant to use for the checkbox: primary, secondary, tertiary, or
/// error (If not specified, default primary color will be used).
@mixin color($theme, $options...) {
@mixin color($theme, $custom-tokens: (), $options...) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO we shouldn't add tokens to the existing mixins. We should just one extra mixin like customize (name to be debated) where users pass in a flat map of tokens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
detected: feature PR contains a feature commit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants