-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(theming): add initial version for user-facing theming #1239
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
kara
left a comment
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 found a few typos
src/lib/button/_button-base.scss
Outdated
| &::after { | ||
| // The button spec calls for focus on raised buttons (and FABs) to be indicated with a | ||
| // black, 12% opacity shade over the normal color (for both light and dark themes). | ||
| // We do this by placing an :after psuedo-element with the appropriate shade over 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.
Typo: psuedo -> pseudo
src/lib/core/theming/_palette.scss
Outdated
| // | ||
| // Contrast colors are hard-coded because it is too difficult (probably impossible) to | ||
| // calculate them. These contrast colors are pulled from the public Material Design spec swatches. | ||
| // While the contrast colors in the spec are not perscriptive, we use them for convenience. |
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.
Typo: perscriptive -> prescriptive
|
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. |
R: @hansl @kara
#123
Apologies for not breaking up this PR into smaller pieces, the changes snowballed on me.
In this PR:
-theme.md-light-themeandmd-dark-themefunctions that outputs a "theme object", which is a sass map containing all of the theme's palettes.core.scssto_core.scss. The practical effect of this is that users either use one of the prebuilt theme css files OR, in defining their custom theme,@includethemd-core()mixin (once). With either approach, the user ends up only importing one css file for material in their app./** */to//. I made this change so that users who consume our mixins do not end up with a bunch of random comments in their css output._mixins.scssand move its contents to more specific files.md-visually-hiddenfrom a mixin to a single class and apply that class to use-sites.Coming in follow-up PRs: