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

Commit

Permalink
chore: cleanup obsolete custom property workaround
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 479372306
  • Loading branch information
patrickrodee authored and copybara-github committed Oct 6, 2022
1 parent 8cb18fb commit 49c56a2
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions packages/mdc-elevation/_elevation-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -273,33 +273,7 @@ $transition-timing-function: animation-variables.$standard-curve-timing-function
$feat-color: feature-targeting.create-target($query, color);

@include feature-targeting.targets($feat-color) {
@if custom-properties.is-custom-prop($box-shadow) {
// TODO(b/185188458): Use theme.property() once resolved.
$fallback: custom-properties.get-fallback($box-shadow);

// var(--<box-shadow-prop>, var(--m-elevation-box-shadow-for-gss))
$gss-custom-prop: custom-properties.create(
custom-properties.get-varname($box-shadow),
custom-properties.create(elevation-box-shadow-for-gss)
);

$value: custom-properties.create-var($gss-custom-prop);
@if $value == null {
// Custom properties are disabled, since $gss-custom-prop
// does not have a fallback. Avoid emitting two non-custom
// prop declarations by setting $fallback to null.
$value: $fallback;
$fallback: null;
}

@include custom-properties.declaration(
custom-properties.create(elevation-box-shadow-for-gss, $fallback)
);
@include css.declaration(box-shadow, $value, $fallback-value: $fallback);
} @else {
/* @alternate */
box-shadow: $box-shadow;
}
@include theme.property(box-shadow, $box-shadow);
}
}

Expand Down

0 comments on commit 49c56a2

Please sign in to comment.