Skip to content

Commit

Permalink
fix(material/divider): move unthemable tokens to theme mixin
Browse files Browse the repository at this point in the history
Though these tokens are not currently affected by the theme, in the
future they will be affected by the design system used for theming (M2
or M3)

BREAKING CHANGE:
There are new styles emitted by mat.divider-theme that are not
emitted by any of: mat.divider-color, mat.divider-typography,
mat.divider-density. If you rely on the partial mixins only and don't
call mat.divider-theme, you can add mat.divider-base to get the
missing styles.
  • Loading branch information
mmalerba committed Oct 19, 2023
1 parent f0697d9 commit 082dc68
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/material/divider/_divider-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
@use '../core/tokens/m2/mat/divider' as tokens-mat-divider;

@mixin base($theme) {
// TODO(mmalerba): Move divider base tokens here
@include sass-utils.current-selector-or-root() {
@include token-utils.create-token-values(
tokens-mat-divider.$prefix, tokens-mat-divider.get-unthemable-tokens());
}
}

@mixin color($theme) {
Expand Down
4 changes: 0 additions & 4 deletions src/material/divider/divider.scss
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
@use '../core/tokens/token-utils';
@use '../core/tokens/m2/mat/divider' as tokens-mat-divider;


$inset-margin: 80px;

.mat-divider {
@include token-utils.create-token-values(
tokens-mat-divider.$prefix, tokens-mat-divider.get-unthemable-tokens());

display: block;
margin: 0;
border-top-style: solid;
Expand Down

0 comments on commit 082dc68

Please sign in to comment.