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

Commit

Permalink
feat(theme): Support currentColor in mdc-theme-prop* (#1657)
Browse files Browse the repository at this point in the history
The `mdc-theme-prop` mixin and `mdc-theme-prop-value` function now treat `currentColor` as if it were a color and emit/return it directly.
  • Loading branch information
acdvorak authored Nov 30, 2017
1 parent 175bd21 commit 7e1255e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/mdc-theme/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// $edgeOptOut controls whether to feature-detect around Edge to avoid emitting CSS variables for it,
// intended for use in cases where interactions with pseudo-element styles cause problems due to Edge bugs.
@mixin mdc-theme-prop($property, $style, $important: false, $edgeOptOut: false) {
@if type-of($style) == "color" {
@if type-of($style) == "color" or $style == "currentColor" {
@if $important {
#{$property}: $style !important;
} @else {
Expand Down
2 changes: 1 addition & 1 deletion packages/mdc-theme/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ $mdc-theme-property-values: (
//
// NOTE: This function must be defined in _variables.scss instead of _functions.scss to avoid circular imports.
@function mdc-theme-prop-value($property) {
@if type-of($property) == color {
@if type-of($property) == "color" or $property == "currentColor" {
@return $property;
}

Expand Down

0 comments on commit 7e1255e

Please sign in to comment.