Skip to content

Commit 2cb5c92

Browse files
committed
fix(material-experimental/mdc-checkbox): reduce amount of emitted theme css
We were adding the ripple variables to the MDC checkbox theme, even though we weren't actually using it. These changes remove the variables which shaves off ~30kb from the theme.
1 parent 603b248 commit 2cb5c92

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/material-experimental/mdc-checkbox/_checkbox-theme.scss

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
@use '@material/checkbox/checkbox' as mdc-checkbox;
22
@use '@material/checkbox/checkbox-theme' as mdc-checkbox-theme;
3-
@use '@material/ripple/ripple-theme' as mdc-ripple-theme;
43
@use '@material/form-field' as mdc-form-field;
54
@use '@material/theme/theme-color' as mdc-theme-color;
65
@use '@material/theme/theme';
@@ -16,17 +15,10 @@
1615
@mixin private-checkbox-styles-with-color($color) {
1716
@include mdc-checkbox-theme.theme-deprecated(
1817
(
19-
density-scale: null,
2018
checkmark-color: mdc-theme-color.prop-value(on-#{$color}),
2119
container-checked-color: $color,
22-
container-checked-hover-color: null,
2320
container-disabled-color: rgba(mdc-theme-color.prop-value(on-surface), 0.38),
2421
outline-color: rgba(mdc-theme-color.prop-value(on-surface), 0.54),
25-
outline-hover-color: null,
26-
ripple-color: mdc-theme-color.prop-value(on-surface),
27-
ripple-opacity: mdc-ripple-theme.$dark-ink-opacities,
28-
ripple-checked-color: $color,
29-
ripple-checked-opacity: mdc-ripple-theme.$dark-ink-opacities,
3022
)
3123
);
3224
}
@@ -71,7 +63,6 @@
7163
);
7264

7365
.mat-mdc-checkbox {
74-
@include private-checkbox-styles-with-color(primary);
7566
@include mdc-form-field.core-styles($query: mdc-helpers.$mat-theme-styles-query);
7667
@include ripple-theme.color((
7768
foreground: (

0 commit comments

Comments
 (0)