Skip to content

Commit f54b830

Browse files
MartijnCuppensXhmikosR
authored andcommitted
Shorten if notations so that property order can be applied
1 parent dc64ff3 commit f54b830

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

scss/_carousel.scss

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,11 @@
111111
}
112112
.carousel-control-prev {
113113
left: 0;
114-
@if $enable-gradients {
115-
background-image: linear-gradient(90deg, rgba($black, .25), rgba($black, .001));
116-
}
114+
background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
117115
}
118116
.carousel-control-next {
119117
right: 0;
120-
@if $enable-gradients {
121-
background-image: linear-gradient(270deg, rgba($black, .25), rgba($black, .001));
122-
}
118+
background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
123119
}
124120

125121
// Icons for within

scss/_dropdown.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,7 @@
166166
pointer-events: none;
167167
background-color: transparent;
168168
// Remove CSS gradients if they're enabled
169-
@if $enable-gradients {
170-
background-image: none;
171-
}
169+
background-image: if($enable-gradients, none, null);
172170
}
173171
}
174172

scss/mixins/_buttons.scss

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,8 @@
4343
.show > &.dropdown-toggle {
4444
color: $active-color;
4545
background-color: $active-background;
46-
@if $enable-gradients {
47-
background-image: none; // Remove the gradient for the pressed/active state
48-
}
46+
// Remove CSS gradients if they're enabled
47+
background-image: if($enable-gradients, none, null);
4948
border-color: $active-border;
5049

5150
&:focus {
@@ -62,11 +61,9 @@
6261
&.disabled {
6362
color: $color;
6463
background-color: $background;
65-
border-color: $border;
6664
// Remove CSS gradients if they're enabled
67-
@if $enable-gradients {
68-
background-image: none;
69-
}
65+
background-image: if($enable-gradients, none, null);
66+
border-color: $border;
7067
}
7168
}
7269

0 commit comments

Comments
 (0)