Skip to content

Commit

Permalink
feat: btn improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
tblivet committed Jul 22, 2024
1 parent eba9093 commit d9ddb31
Show file tree
Hide file tree
Showing 5 changed files with 119 additions and 34 deletions.
4 changes: 2 additions & 2 deletions dist/css/bootstrap-prestashop-ui-kit.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/css/bootstrap-prestashop-ui-kit.css.map

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion scss/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@
}

&:focus,
&:active:focus,
&:focus-visible,
&:active,
&.focus {
z-index: 1;
outline: var(--#{$cdk}size-2) solid $outline-color;
outline-offset: var(--#{$cdk}size-2);
box-shadow: none;
/* stylelint-disable-next-line */
box-shadow: none !important;
}
}

Expand Down
49 changes: 22 additions & 27 deletions scss/mixins/_buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,6 @@
$active-border: $border,
$color-name: "primary"
) {
@if $color-name == "light" {
color: var(--#{$cdk}primary-800);
} @else if $color-name == "warning" {
color: var(--#{$cdk}primary-800);
} @else if $color-name == "secondary" {
@include hover-focus() {
color: var(--#{$cdk}primary-800);
background-color: var(--#{$cdk}primary-400);
border-color: var(--#{$cdk}primary-400);
}
} @else {
color: var(--#{$cdk}white);
background-color: $background;
border-color: $border;
box-shadow: none;

&:hover {
color: var(--#{$cdk}white);
background-color: $hover-background;
border-color: $hover-border;
}
}


&:focus,
&.focus {
color: var(--#{$cdk}white);
Expand Down Expand Up @@ -60,17 +36,36 @@
box-shadow: none;
}

@if $color-name == "secondary" {
@if $color-name == "light" {
color: var(--#{$cdk}primary-800);
}

@if $color-name == "light" {
&:focus,
&.focus {
color: var(--#{$cdk}primary-800);
background-color: var(--#{$cdk}primary-400);
border-color: var(--#{$cdk}primary-400);
}
} @else if $color-name == "warning" {
color: var(--#{$cdk}primary-800);
} @else if $color-name == "secondary" {
color: var(--#{$cdk}primary-800);

@include hover-focus() {
color: var(--#{$cdk}primary-800);
background-color: var(--#{$cdk}primary-400);
border-color: var(--#{$cdk}primary-400);
}
} @else {
color: var(--#{$cdk}white);
background-color: $background;
border-color: $border;
box-shadow: none;

&:hover {
color: var(--#{$cdk}white);
background-color: $hover-background;
border-color: $hover-border;
}
}
}

Expand Down

0 comments on commit d9ddb31

Please sign in to comment.