Skip to content

Commit f7acb27

Browse files
authored
Refactor a few selectors so that the least specific ones are first. (#24310)
1 parent 8e7ba02 commit f7acb27

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

scss/_card.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,10 @@
213213
}
214214
}
215215

216+
&:only-child {
217+
@include border-radius($card-border-radius);
218+
}
219+
216220
&:not(:first-child):not(:last-child):not(:only-child) {
217221
border-radius: 0;
218222

@@ -221,10 +225,6 @@
221225
border-radius: 0;
222226
}
223227
}
224-
225-
&:only-child {
226-
@include border-radius($card-border-radius);
227-
}
228228
}
229229
}
230230
}

scss/_dropdown.scss

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,6 @@
99
@include caret;
1010
}
1111

12-
// Allow for dropdowns to go bottom up (aka, dropup-menu)
13-
// Just add .dropup after the standard .dropdown class and you're set.
14-
.dropup {
15-
.dropdown-menu {
16-
margin-top: 0;
17-
margin-bottom: $dropdown-spacer;
18-
}
19-
20-
.dropdown-toggle {
21-
@include caret(up);
22-
}
23-
}
24-
2512
// The dropdown menu
2613
.dropdown-menu {
2714
position: absolute;
@@ -44,6 +31,19 @@
4431
@include box-shadow($dropdown-box-shadow);
4532
}
4633

34+
// Allow for dropdowns to go bottom up (aka, dropup-menu)
35+
// Just add .dropup after the standard .dropdown class and you're set.
36+
.dropup {
37+
.dropdown-menu {
38+
margin-top: 0;
39+
margin-bottom: $dropdown-spacer;
40+
}
41+
42+
.dropdown-toggle {
43+
@include caret(up);
44+
}
45+
}
46+
4747
// Dividers (basically an `<hr>`) within the dropdown
4848
.dropdown-divider {
4949
@include nav-divider($dropdown-divider-bg);

scss/_tooltip.scss

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@
2121
height: $tooltip-arrow-height;
2222
}
2323

24+
.arrow::before {
25+
position: absolute;
26+
border-color: transparent;
27+
border-style: solid;
28+
}
29+
2430
&.bs-tooltip-top {
2531
padding: $tooltip-arrow-width 0;
2632
.arrow {
@@ -88,12 +94,6 @@
8894
@extend .bs-tooltip-left;
8995
}
9096
}
91-
92-
.arrow::before {
93-
position: absolute;
94-
border-color: transparent;
95-
border-style: solid;
96-
}
9797
}
9898

9999
// Wrapper for the tooltip content

0 commit comments

Comments
 (0)