Skip to content

Commit 42b64b5

Browse files
authored
fix(scss notation): fix & notation for menus (#5004)
1 parent 0104ee9 commit 42b64b5

File tree

3 files changed

+457
-460
lines changed

3 files changed

+457
-460
lines changed

ui/components/menus/dropdown/_deprecate.scss

Lines changed: 61 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,42 @@
2626

2727
@include deprecate('4.0.0', 'Please use slds-nubbin-{position} instead') {
2828

29-
.slds-dropdown {
29+
.slds-dropdown_nubbin-top,
30+
.slds-dropdown--nubbin-top {
31+
@include nubbin(top, 'before');
32+
@include nubbin(top);
33+
margin-top: ($nubbin-size-default * 0.5);
34+
35+
&:before {
36+
background: $color-background-alt;
37+
}
3038

31-
&_nubbin-top,
32-
&--nubbin-top {
33-
@include nubbin(top, 'before');
34-
@include nubbin(top);
35-
margin-top: ($nubbin-size-default * 0.5);
39+
&:after {
40+
background: $color-background-alt;
41+
box-shadow: -1px -1px 0 0 rgba(0, 0, 0, 0.16);
42+
z-index: -1;
43+
}
3644

37-
&:before {
38-
background: $color-background-alt;
39-
}
45+
&.slds-dropdown_left,
46+
&.slds-dropdown--left {
47+
left: ($spacing-medium * -1);
4048

49+
&:before,
4150
&:after {
42-
background: $color-background-alt;
43-
box-shadow: -1px -1px 0 0 rgba(0, 0, 0, 0.16);
44-
z-index: -1;
45-
}
46-
47-
&.slds-dropdown_left,
48-
&.slds-dropdown--left {
49-
left: ($spacing-medium * -1);
50-
51-
&:before,
52-
&:after {
53-
left: $spacing-large;
54-
margin-left: 0;
55-
}
51+
left: $spacing-large;
52+
margin-left: 0;
5653
}
54+
}
5755

58-
&.slds-dropdown_right,
59-
&.slds-dropdown--right {
60-
right: ($spacing-medium * -1);
56+
&.slds-dropdown_right,
57+
&.slds-dropdown--right {
58+
right: ($spacing-medium * -1);
6159

62-
&:before,
63-
&:after {
64-
left: auto;
65-
right: $spacing-large;
66-
margin-left: 0;
67-
}
60+
&:before,
61+
&:after {
62+
left: auto;
63+
right: $spacing-large;
64+
margin-left: 0;
6865
}
6966
}
7067
}
@@ -77,46 +74,46 @@
7774
.slds-has-icon {
7875
position: relative;
7976

80-
&_left > a,
81-
&--left > a,
82-
&_left > span,
83-
&--left > span {
84-
padding-left: $spacing-x-large;
85-
}
86-
87-
&_right > a,
88-
&--right > a,
89-
&_right > span,
90-
&--right > span {
91-
padding-right: $spacing-x-large;
92-
}
93-
94-
&_left-right > a,
95-
&--left-right > a,
96-
&_left-right > span,
97-
&--left-right > span {
98-
padding: {
99-
left: $spacing-x-large;
100-
right: $spacing-x-large;
101-
}
102-
}
103-
10477
.slds-icon {
10578
@include square($square-icon-medium-content);
10679
position: absolute;
10780
top: 50%;
10881
margin-top: (($square-icon-medium-content * 0.5) * -1);
10982
fill: $color-text-icon-default;
83+
}
11084

111-
&_left,
112-
&--left {
113-
left: $spacing-small;
114-
}
85+
.slds-icon_left,
86+
.slds-icon--left {
87+
left: $spacing-small;
88+
}
89+
90+
.slds-icon_right,
91+
.slds-icon--right {
92+
right: $spacing-small;
93+
}
94+
}
95+
96+
.slds-has-icon_left > a,
97+
.slds-has-icon--left > a,
98+
.slds-has-icon_left > span,
99+
.slds-has-icon--left > span {
100+
padding-left: $spacing-x-large;
101+
}
102+
103+
.slds-has-icon_right > a,
104+
.slds-has-icon--right > a,
105+
.slds-has-icon_right > span,
106+
.slds-has-icon--right > span {
107+
padding-right: $spacing-x-large;
108+
}
115109

116-
&_right,
117-
&--right {
118-
right: $spacing-small;
119-
}
110+
.slds-has-icon_left-right > a,
111+
.slds-has-icon--left-right > a,
112+
.slds-has-icon_left-right > span,
113+
.slds-has-icon--left-right > span {
114+
padding: {
115+
left: $spacing-x-large;
116+
right: $spacing-x-large;
120117
}
121118
}
122119
}

0 commit comments

Comments
 (0)