Skip to content

Commit

Permalink
Merge pull request #5856 from pat270/LPD-33629
Browse files Browse the repository at this point in the history
LPD-33629 $modal-palette map should output pseudo classes for .close
  • Loading branch information
matuzalemsteles authored Aug 13, 2024
2 parents 7a90ec5 + d179f95 commit 1f9b524
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions packages/clay-css/src/scss/mixins/_globals.scss
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,21 @@
@each $key, $value in $map {
@if not clay-is-map-unset($value) {
@if (type-of($value) == 'map') {
$pseudo-classes: 'active', 'disabled', 'first-child', 'focus',
'hover', 'last-child', 'visited';

$pseudo-elements: 'after', 'before';

$valid-prefixes: '#', '&', '.', '>', '@', '~', '+', '[';

@if (index($pseudo-classes, $key)) {
$key: str-insert($key, '&:', 1);
}

@if (index($pseudo-elements, $key)) {
$key: str-insert($key, '&::', 1);
}

$selector: if(
index($valid-prefixes, str-slice($key, 1, 1)),
$key,
Expand Down

0 comments on commit 1f9b524

Please sign in to comment.