Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flex basis alias support #13

Merged
merged 9 commits into from
Feb 17, 2023
Prev Previous commit
Next Next commit
fix(flex): fix flex basis alias attributes
  • Loading branch information
lievenjanssen committed Feb 15, 2023
commit eeb0ecfe8b6bc582b5b7cfe57a83e837cfe18438
38 changes: 23 additions & 15 deletions src/lib/flex-attributes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,35 @@
@include flex-properties;
}

*[data-fx-flex-auto] {
*[data-fx-flex^="auto"] {
@include flex-auto-properties;
}

*[data-fx-flex-grow] {
*[data-fx-flex^="grow"] {
@include flex-grow-properties;
}

*[data-fx-flex-initial] {
*[data-fx-flex-grow] {
@include flex-grow-properties;
}

*[data-fx-flex^="initial"] {
@include flex-initial-properties;
}

*[data-fx-flex-none] {
*[data-fx-flex^="none"] {
@include flex-none-properties;
}

*[data-fx-flex-nogrow] {
*[data-fx-flex^="nogrow"] {
@include flex-nogrow-properties;
}

*[data-fx-flex-noshrink] {
*[data-fx-flex^="noshrink"] {
@include flex-noshrink-properties;
}

*:has(>[data-fx-flex],>[data-fx-flex-auto],>[data-fx-flex-grow],>[data-fx-flex-initial],>[data-fx-flex-none],>[data-fx-flex-nogrow],>[data-fx-flex-noshrink]):not([data-layout]) {
*:has(>[data-fx-flex],>[data-fx-flex-grow]):not([data-layout]) {
@include flex-row-properties;
}
}
Expand All @@ -40,30 +44,34 @@
@each $name, $_ in $flex-layout-media-queries {
@include flex-layout-media($name) {
*[data-fx-flex-#{$name}] {
@include flex-auto-properties;
}

*[data-fx-flex-#{$name}^="auto"] {
@include flex-properties;
}

*[data-fx-flex-auto-#{$name}] {
@include flex-auto-properties;
*[data-fx-flex-#{$name}^="grow"] {
@include flex-grow-properties;
}

*[data-fx-flex-grow-#{$name}] {
@include flex-grow-properties;
}

*[data-fx-flex-initial-#{$name}] {
*[data-fx-flex-#{$name}^="initial"] {
@include flex-initial-properties;
}

*[data-fx-flex-none-#{$name}] {
*[data-fx-flex-#{$name}^="none"] {
@include flex-none-properties;
}

*[data-fx-flex-nogrow-#{$name}] {
*[data-fx-flex-#{$name}^="nogrow"] {
@include flex-nogrow-properties;
}

*[data-fx-flex-noshrink-#{$name}] {
*[data-fx-flex-#{$name}^="noshrink"] {
@include flex-noshrink-properties;
}
}
Expand Down