-
Notifications
You must be signed in to change notification settings - Fork 6.8k
docs(material/theming): Add docs for the new base theming dimension #27992
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
Conversation
fe2eece
to
3e2b0e0
Compare
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.
LGTM, just some minor suggestions
@@ -235,6 +238,95 @@ your project's `angular.json` file][adding-styles]. | |||
|
|||
[adding-styles]: https://angular.io/guide/workspace-config#styles-and-scripts-configuration | |||
|
|||
#### Theming dimensions | |||
|
|||
Angular Material themes are divided along several dimensions: |
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.
Angular Material themes are divided along several dimensions: | |
Angular Material themes are organized into four categories: |
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.
I was hoping to use the term "dimension" so we have a way to talk about these categories in a way that feels slightly less general than "category"
guides/theming.md
Outdated
: Common base styles for the design system. These styles don't change based on your configured | ||
colors, typography, or density, so they only need to be included once per application. These | ||
styles may include things such as border-radius, border-width, etc. All components have a base | ||
mixin that can be used to include its base styles. (For example, |
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.
Should we say something about only most apps needing to import them once, but that you can still include it multiple times if you want to change the base styles for different parts of your app?
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.
Well the thing is right now you can't really change it. The base styles are basically values for all of the tokens that don't depend on color, typography, or density, but may vary between M2, M3, or some future Material Design version. Since currently M2 is the only one available, the mixin always emits the same values.
In the future there could maybe be a use case for it, if some app wanted to display M2 vs M3 conditionally.
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.
Another future use case is maybe once we have a Sass API to allow per-token customizations, but again thats not something we have now, so for now it just feels simplest to say "include it once"
7688f99
to
f649228
Compare
Co-authored-by: Jeremy Elbourn <[email protected]>
f649228
to
bb71a4a
Compare
…27992) Co-authored-by: Jeremy Elbourn <[email protected]> (cherry picked from commit e2ac195)
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Demo: https://mmalerba-demo.web.app/guide/theming