Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit dc52201

Browse files
authored
fix(theme): Move @alternate annotations for Closure Stylesheets (#2355)
`@alternate` annotations need to come before the _second_ property. Otherwise, Closure Compiler strips the first property (it does not output it at all).
1 parent 3c04419 commit dc52201

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/mdc-theme/_mixins.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
$value: map-get($mdc-theme-property-values, $style);
3737

3838
@if $important {
39-
/* @alternate */
4039
#{$property}: $value !important;
4140

4241
@if $edgeOptOut {
@@ -45,17 +44,18 @@
4544
@supports not (-ms-ime-align:auto) {
4645
// stylelint-disable scss/selector-no-redundant-nesting-selector
4746
& {
47+
/* @alternate */
4848
#{$property}: var(--mdc-theme-#{$style}, $value) !important;
4949
}
5050
// stylelint-enable scss/selector-no-redundant-nesting-selector
5151
}
5252
}
5353
// stylelint-enable max-nesting-depth
5454
} @else {
55+
/* @alternate */
5556
#{$property}: var(--mdc-theme-#{$style}, $value) !important;
5657
}
5758
} @else {
58-
/* @alternate */
5959
#{$property}: $value;
6060

6161
@if $edgeOptOut {
@@ -64,13 +64,15 @@
6464
@supports not (-ms-ime-align:auto) {
6565
// stylelint-disable scss/selector-no-redundant-nesting-selector
6666
& {
67+
/* @alternate */
6768
#{$property}: var(--mdc-theme-#{$style}, $value);
6869
}
6970
// stylelint-enable scss/selector-no-redundant-nesting-selector
7071
}
7172
}
7273
// stylelint-enable max-nesting-depth
7374
} @else {
75+
/* @alternate */
7476
#{$property}: var(--mdc-theme-#{$style}, $value);
7577
}
7678
}

0 commit comments

Comments
 (0)