-
Notifications
You must be signed in to change notification settings - Fork 6.8k
feat(material/core): expose new @use-based Sass API #22173
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
@@ -0,0 +1,88 @@ | |||
// Theming APIs | |||
@forward './core/theming/theming' show define-light-theme, define-dark-theme, |
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.
Technically we don't need to list out all the APIs with show
, but I liked being explicit about what we expose. I'm open towards changing it since this could result in us forgetting to re-export a new API.
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.
+1, I like this being explicit as well; from here it's easy to see our entire Sass API surface
@@ -12,7 +12,7 @@ | |||
} | |||
|
|||
// Gets the line height for a level inside a typography config. | |||
@function height($config, $level) { | |||
@function line-height($config, $level) { |
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.
This fixes an accidental rename that happened during the automated migration.
956ad5d
to
36ddb8b
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.
Overall amazing, text-field is the only actual comment. I'll start a presubmit now, though, and see what comes up
@@ -0,0 +1,88 @@ | |||
// Theming APIs | |||
@forward './core/theming/theming' show define-light-theme, define-dark-theme, |
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.
+1, I like this being explicit as well; from here it's easy to see our entire Sass API surface
Ah, we should also add the deprecations to the commit for the changelog |
b38346a
to
b757526
Compare
@jelbourn I've addressed the feedback by doing the following:
Note that the CI is currently failing, because CircleCI is down. I'll make sure that it's green once Circle is back up. |
b757526
to
bdb6ff3
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
f1270bc
to
dd6ae86
Compare
Reworks the public Sass API to take advantage of `@use` in order to allow for a single entry point into `@angular/material` or `@angular/cdk`. Some mixins and variables were renamed in order be a better reflection of what they do. Before: ``` @import '~@angular/material/theming'; @include mat-core(); $candy-app-primary: mat-palette($mat-indigo); $candy-app-accent: mat-palette($mat-pink, A200, A100, A400); $candy-app-warn: mat-palette($mat-red); $candy-app-theme: mat-light-theme(( color: ( primary: $candy-app-primary, accent: $candy-app-accent, warn: $candy-app-warn, ) )); @include angular-material-theme($candy-app-theme); ``` After: ``` @use '~@angular/material' as mat; @include mat.core(); $candy-app-primary: mat.define-palette(mat.$indigo-palette); $candy-app-accent: mat.define-palette(mat.$pink-palette, A200, A100, A400); $candy-app-warn: mat.define-palette(mat.$red-palette); $candy-app-theme: mat.define-light-theme(( color: ( primary: $candy-app-primary, accent: $candy-app-accent, warn: $candy-app-warn, ) )); @include mat.all-component-themes($candy-app-theme); ```
dd6ae86
to
38b392a
Compare
This change completely rewrites the theming guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of palettes, hues, and themes. * Ensure all content is conceptual and not task-based. * Use the new Sass `@use` API introduced in angular#22173 * Document usage of the theming system with shadow dom * Document the fact that CSS overrides are strongly discouraged * Be more explicit about which palettes we provide * Consolidate on a single approach to including theme CSS in an app (assuming Angular CLI) I will send follow-up PRs for the typography, theming-your-components, and customizing-component-styles guides.
This change completely rewrites the theming guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of palettes, hues, and themes. * Ensure all content is conceptual and not task-based. * Use the new Sass `@use` API introduced in angular#22173 * Document usage of the theming system with shadow dom * Document the fact that CSS overrides are strongly discouraged * Be more explicit about which palettes we provide * Consolidate on a single approach to including theme CSS in an app (assuming Angular CLI) I will send follow-up PRs for the typography, theming-your-components, and customizing-component-styles guides.
This change completely rewrites the theming guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of palettes, hues, and themes. * Ensure all content is conceptual and not task-based. * Use the new Sass `@use` API introduced in angular#22173 * Document usage of the theming system with shadow dom * Document the fact that CSS overrides are strongly discouraged * Be more explicit about which palettes we provide * Consolidate on a single approach to including theme CSS in an app (assuming Angular CLI) I will send follow-up PRs for the typography, theming-your-components, and customizing-component-styles guides.
This change completely rewrites the theming guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of palettes, hues, and themes. * Ensure all content is conceptual and not task-based. * Use the new Sass `@use` API introduced in angular#22173 * Document usage of the theming system with shadow dom * Document the fact that CSS overrides are strongly discouraged * Be more explicit about which palettes we provide * Consolidate on a single approach to including theme CSS in an app (assuming Angular CLI) I will send follow-up PRs for the typography, theming-your-components, and customizing-component-styles guides.
This change completely rewrites the theming guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of palettes, hues, and themes. * Ensure all content is conceptual and not task-based. * Use the new Sass `@use` API introduced in angular#22173 * Document usage of the theming system with shadow dom * Document the fact that CSS overrides are strongly discouraged * Be more explicit about which palettes we provide * Consolidate on a single approach to including theme CSS in an app (assuming Angular CLI) I will send follow-up PRs for the typography, theming-your-components, and customizing-component-styles guides.
This change completely rewrites the theming guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of palettes, hues, and themes. * Ensure all content is conceptual and not task-based. * Use the new Sass `@use` API introduced in #22173 * Document usage of the theming system with shadow dom * Document the fact that CSS overrides are strongly discouraged * Be more explicit about which palettes we provide * Consolidate on a single approach to including theme CSS in an app (assuming Angular CLI) I will send follow-up PRs for the typography, theming-your-components, and customizing-component-styles guides.
This change completely rewrites the typography guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of "typography level" and "typography config". * Ensure all content is conceptual and not task-based. * Use new Sass `@use` API introduiced in angular#22173 * Split up level descriptions from CSS classes * Clarify that the system currently uses the 2014-era typography levels This is the second PR in a series, following angular#22268. After this will be PRs for theming-your-components, customizing-component-styles, and new docs for strong focus indicators.
This change completely rewrites the typography guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of "typography level" and "typography config". * Ensure all content is conceptual and not task-based. * Use new Sass `@use` API introduiced in angular#22173 * Split up level descriptions from CSS classes * Clarify that the system currently uses the 2014-era typography levels This is the second PR in a series, following angular#22268. After this will be PRs for theming-your-components, customizing-component-styles, and new docs for strong focus indicators.
This change completely rewrites the typography guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of "typography level" and "typography config". * Ensure all content is conceptual and not task-based. * Use new Sass `@use` API introduiced in angular#22173 * Split up level descriptions from CSS classes * Clarify that the system currently uses the 2014-era typography levels This is the second PR in a series, following angular#22268. After this will be PRs for theming-your-components, customizing-component-styles, and new docs for strong focus indicators.
This change completely rewrites the typography guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of "typography level" and "typography config". * Ensure all content is conceptual and not task-based. * Use new Sass `@use` API introduiced in angular#22173 * Split up level descriptions from CSS classes * Clarify that the system currently uses the 2014-era typography levels This is the second PR in a series, following angular#22268. After this will be PRs for theming-your-components, customizing-component-styles, and new docs for strong focus indicators.
This change completely rewrites the typography guide to be more complete, correct, and concise. Summary of changes: * Explain the concepts of "typography level" and "typography config". * Ensure all content is conceptual and not task-based. * Use new Sass `@use` API introduiced in #22173 * Split up level descriptions from CSS classes * Clarify that the system currently uses the 2014-era typography levels This is the second PR in a series, following #22268. After this will be PRs for theming-your-components, customizing-component-styles, and new docs for strong focus indicators.
This change completely rewrites the theming-your-components guide to be more complete, correct, and concise. Summary of changes: * Start document with some explanatory content before diving into step-by-step tutorial. * Use new Sass `@use` API introduced in angular#22173 * Document (and expose) `get-color-config` and `get-typography-config`
This change completely rewrites the theming-your-components guide to be more complete, correct, and concise. Summary of changes: * Start document with some explanatory content before diving into step-by-step tutorial. * Use new Sass `@use` API introduced in angular#22173 * Document (and expose) `get-color-config` and `get-typography-config`
This change completely rewrites the theming-your-components guide to be more complete, correct, and concise. Summary of changes: * Start document with some explanatory content before diving into step-by-step tutorial. * Use new Sass `@use` API introduced in #22173 * Document (and expose) `get-color-config` and `get-typography-config`
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. |
Reworks the public Sass API to take advantage of
@use
in order to allow for a singleentry point into
@angular/material
or@angular/cdk
. Some mixins and variables wererenamed in order be a better reflection of what they do.
Before:
After: