Skip to content

Commit

Permalink
feat: add mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
tblivet committed Jul 24, 2024
1 parent f24e9c1 commit dccd094
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 90 deletions.
2 changes: 1 addition & 1 deletion dist/css/bootstrap-prestashop-ui-kit.css

Large diffs are not rendered by default.

92 changes: 3 additions & 89 deletions dist/js/prestashop-ui-kit.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions scss/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
@import "mixins/shadows";
@import "mixins/buttons";
@import "mixins/forms";
@import "mixins/states";

// Addons
@import "~select2/src/scss/core";
Expand Down
31 changes: 31 additions & 0 deletions scss/mixins/_states.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@mixin focus() {
&:focus-visible,
&:focus,
&.focus {
@content;
}
}

@mixin focus-active() {
&:focus-visible,
&:focus,
&.focus,
&:active,
&.active,
&:not([disabled]):not(.disabled):active,
&:not([disabled]):not(.disabled).active,
.show > &.dropdown-toggle {
@content;
}
}

@mixin disabled() {
&.disabled,
&:disabled,
&.disabled:active:focus,
&.disabled:active:focus-visible,
&:disabled:active:focus,
&:disabled:active:focus-visible {
@content;
}
}

0 comments on commit dccd094

Please sign in to comment.