Skip to content

Commit

Permalink
Shorten if notations so that property order can be applied
Browse files Browse the repository at this point in the history
  • Loading branch information
MartijnCuppens committed Dec 26, 2019
1 parent 387f2bd commit 547be8e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
8 changes: 2 additions & 6 deletions scss/_carousel.scss
Expand Up @@ -111,15 +111,11 @@
}
.carousel-control-prev {
left: 0;
@if $enable-gradients {
background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
}
background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
}
.carousel-control-next {
right: 0;
@if $enable-gradients {
background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
}
background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
}

// Icons for within
Expand Down
4 changes: 1 addition & 3 deletions scss/_dropdown.scss
Expand Up @@ -166,9 +166,7 @@
pointer-events: none;
background-color: transparent;
// Remove CSS gradients if they're enabled
@if $enable-gradients {
background-image: none;
}
background-image: if($enable-gradients, none, null);
}
}

Expand Down
11 changes: 4 additions & 7 deletions scss/mixins/_buttons.scss
Expand Up @@ -43,21 +43,18 @@
&:disabled {
color: $color;
background-color: $background;
border-color: $border;
// Remove CSS gradients if they're enabled
@if $enable-gradients {
background-image: none;
}
background-image: if($enable-gradients, none, null);
border-color: $border;
}

&:not(:disabled):not(.disabled):active,
&:not(:disabled):not(.disabled).active,
.show > &.dropdown-toggle {
color: $active-color;
background-color: $active-background;
@if $enable-gradients {
background-image: none; // Remove the gradient for the pressed/active state
}
// Remove CSS gradients if they're enabled
background-image: if($enable-gradients, none, null);
border-color: $active-border;

&:focus {
Expand Down

0 comments on commit 547be8e

Please sign in to comment.