Skip to content

Commit

Permalink
fix(@clayui/css): Mixins clay-dropdown-item-variant split up `&.aut…
Browse files Browse the repository at this point in the history
…ofit-row` and `.autofit-row`

    - Allow customizing `autofit-col` and `autofit-col-expand` for each
  • Loading branch information
pat270 committed Dec 15, 2021
1 parent 45cb0e5 commit a314710
Showing 1 changed file with 44 additions and 2 deletions.
46 changes: 44 additions & 2 deletions packages/clay-css/src/scss/mixins/_dropdown-menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,23 @@
/// enabled: {Bool}, // Set to false to prevent .c-inner styles from being output. Default: true
/// // .dropdown-item .c-inner
/// ),
/// '&.autofit-row': (
/// // .dropdown-item.autofit-row
/// autofit-col: (
/// // .dropdown-item.autofit-row > .autofit-col
/// ),
/// autofit-col-expand: (
/// // .dropdown-item.autofit-row > .autofit-col-expand
/// ),
/// ),
/// autofit-row: (
/// // .dropdown-item.autofit-row, .dropdown-item .autofit-row
/// // .dropdown-item .autofit-row
/// autofit-col: (
/// // .dropdown-item .autofit-row > .autofit-col
/// ),
/// autofit-col-expand: (
/// // .dropdown-item .autofit-row > .autofit-col-expand
/// ),
/// ),
/// c-kbd-inline: (
/// // .dropdown-item .c-kbd-inline
Expand Down Expand Up @@ -604,9 +619,36 @@
}
}

&.autofit-row,
&.autofit-row {
@include clay-css(map-deep-get($map, '&.autofit-row'));

> .autofit-col {
@include clay-css(
map-deep-get($map, '&.autofit-row', autofit-col)
);
}

> .autofit-col-expand {
@include clay-css(
map-deep-get($map, '&.autofit-row', autofit-col-expand)
);
}
}

.autofit-row {
@include clay-css($autofit-row);

> .autofit-col {
@include clay-css(
map-deep-get($map, autofit-row, autofit-col)
);
}

> .autofit-col-expand {
@include clay-css(
map-deep-get($map, autofit-row, autofit-col-expand)
);
}
}

.c-kbd-inline {
Expand Down

0 comments on commit a314710

Please sign in to comment.