-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[docs] Use slot variants over theme.variants
#42614
Conversation
Netlify deploy previewBundle size report |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some copy related comments and some questions.
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
}); | ||
``` | ||
|
||
**Example 2**: Overriding styles based on new values. If your project needs a new Button's variant, use the following snippet: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, this doesn't feel like an override to me—it's a completely new thing that we're adding to the component's surface area.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hard to justify. Even though it's about adding new value, it's still overriding the default styles of the Button.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left few comments on the copy writing, the content looks good in general.
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left copy-related comments for your consideration.
(Just saw @mnajdova submitted a review so maybe some comments collide, sorry about that)
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
docs/data/material/customization/theme-components/theme-components.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Marija Najdova <[email protected]> Signed-off-by: Siriwat K <[email protected]>
closes #30412
Based on #30412 (comment),
theme.variants
is no longer needed.Using slot variants reduces the API surface, allows developers to customize any slot, and is compatible with Pigment CSS too.