Skip to content

Commit c97e93c

Browse files
authored
fix(scss notation): fix & notation for utilities / themes (#5009)
1 parent 10a07c4 commit c97e93c

File tree

1 file changed

+124
-117
lines changed

1 file changed

+124
-117
lines changed

ui/utilities/themes/_index.scss

Lines changed: 124 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,134 +1,141 @@
11
// Copyright (c) 2015-present, salesforce.com, inc. All rights reserved
22
// Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license
33

4+
/**
5+
* @summary Sets the theme
6+
*
7+
* @selector .slds-theme
8+
*/
49
.slds-theme {
5-
/**
6-
* @summary Sets the background color to white
7-
*
8-
* @selector .slds-theme_default
9-
* @modifier
10-
*/
11-
&_default,
12-
&--default {
13-
@include theme(default);
14-
}
10+
/* Empty annotation for validator */
11+
}
1512

16-
/**
17-
* @summary Sets the background color to gray
18-
*
19-
* @selector .slds-theme_shade
20-
* @modifier
21-
*/
22-
&_shade,
23-
&--shade {
24-
@include theme(shade);
25-
}
13+
/**
14+
* @summary Sets the background color to white
15+
*
16+
* @selector .slds-theme_default
17+
* @modifier
18+
*/
19+
.slds-theme_default,
20+
.slds-theme--default {
21+
@include theme(default);
22+
}
2623

27-
/**
28-
* @summary Sets the background color to dark blue
29-
*
30-
* @selector .slds-theme_inverse
31-
* @modifier
32-
*/
33-
&_inverse,
34-
&--inverse {
35-
@include theme(inverse);
36-
border-color: $color-background-inverse;
37-
}
24+
/**
25+
* @summary Sets the background color to gray
26+
*
27+
* @selector .slds-theme_shade
28+
* @modifier
29+
*/
30+
.slds-theme_shade,
31+
.slds-theme--shade {
32+
@include theme(shade);
33+
}
3834

39-
/**
40-
* @summary Sets the background color to darker blue
41-
*
42-
* @selector .slds-theme_alt-inverse
43-
* @modifier
44-
*/
45-
&_alt-inverse,
46-
&--alt-inverse {
47-
@include theme(alt-inverse);
48-
border-color: $color-background-alt-inverse;
49-
}
35+
/**
36+
* @summary Sets the background color to dark blue
37+
*
38+
* @selector .slds-theme_inverse
39+
* @modifier
40+
*/
41+
.slds-theme_inverse,
42+
.slds-theme--inverse {
43+
@include theme(inverse);
44+
border-color: $color-background-inverse;
45+
}
5046

51-
/**
52-
* @summary Sets the background color to green
53-
*
54-
* @selector .slds-theme_success
55-
* @modifier
56-
*/
57-
&_success,
58-
&--success {
59-
@include inverse-links;
60-
background-color: $color-background-toast-success;
61-
}
47+
/**
48+
* @summary Sets the background color to darker blue
49+
*
50+
* @selector .slds-theme_alt-inverse
51+
* @modifier
52+
*/
53+
.slds-theme_alt-inverse,
54+
.slds-theme--alt-inverse {
55+
@include theme(alt-inverse);
56+
border-color: $color-background-alt-inverse;
57+
}
6258

63-
/**
64-
* @summary Sets the background color to gray-ish blue
65-
*
66-
* @selector .slds-theme_info
67-
* @modifier
68-
*/
69-
&_info,
70-
&--info {
71-
@include inverse-links;
72-
background-color: $color-background-toast;
73-
}
59+
/**
60+
* @summary Sets the background color to green
61+
*
62+
* @selector .slds-theme_success
63+
* @modifier
64+
*/
65+
.slds-theme_success,
66+
.slds-theme--success {
67+
@include inverse-links;
68+
background-color: $color-background-toast-success;
69+
}
7470

75-
/**
76-
* @summary Sets the background color to yellow
77-
*
78-
* @selector .slds-theme_warning
79-
* @modifier
80-
*/
81-
&_warning,
82-
&--warning {
83-
@include warning-links;
84-
@include warning-buttons;
85-
background-color: $color-background-warning;
86-
color: $color-text-default;
71+
/**
72+
* @summary Sets the background color to gray-ish blue
73+
*
74+
* @selector .slds-theme_info
75+
* @modifier
76+
*/
77+
.slds-theme_info,
78+
.slds-theme--info {
79+
@include inverse-links;
80+
background-color: $color-background-toast;
81+
}
8782

88-
.slds-icon,
89-
.slds-button__icon {
90-
fill: $color-gray-10;
91-
}
92-
}
83+
/**
84+
* @summary Sets the background color to yellow
85+
*
86+
* @selector .slds-theme_warning
87+
* @modifier
88+
*/
89+
.slds-theme_warning,
90+
.slds-theme--warning {
91+
@include warning-links;
92+
@include warning-buttons;
93+
background-color: $color-background-warning;
94+
color: $color-text-default;
9395

94-
/**
95-
* @summary Sets the background color to red
96-
*
97-
* @selector .slds-theme_error
98-
* @modifier
99-
*/
100-
&_error,
101-
&--error {
102-
@include inverse-links;
103-
background-color: $color-background-toast-error;
96+
.slds-icon,
97+
.slds-button__icon {
98+
fill: $color-gray-10;
10499
}
100+
}
105101

106-
/**
107-
* @summary Sets the background color to black
108-
*
109-
* @selector .slds-theme_offline
110-
* @modifier
111-
*/
112-
&_offline,
113-
&--offline {
114-
@include inverse-links;
115-
background-color: #444;
116-
}
102+
/**
103+
* @summary Sets the background color to red
104+
*
105+
* @selector .slds-theme_error
106+
* @modifier
107+
*/
108+
.slds-theme_error,
109+
.slds-theme--error {
110+
@include inverse-links;
111+
background-color: $color-background-toast-error;
112+
}
117113

118-
/**
119-
* @summary Adds striped background
120-
*
121-
* @selector .slds-theme_alert-texture
122-
* @modifier
123-
*/
124-
&_alert-texture,
125-
&--alert-texture {
126-
@include gradient-striped;
127-
}
114+
/**
115+
* @summary Sets the background color to black
116+
*
117+
* @selector .slds-theme_offline
118+
* @modifier
119+
*/
120+
.slds-theme_offline,
121+
.slds-theme--offline {
122+
@include inverse-links;
123+
background-color: #444;
124+
}
128125

129-
// Is this being used?
130-
&_inverse-text,
131-
&--inverse-text {
132-
@include inverse-links;
133-
}
126+
/**
127+
* @summary Adds striped background
128+
*
129+
* @selector .slds-theme_alert-texture
130+
* @modifier
131+
*/
132+
.slds-theme_alert-texture,
133+
.slds-theme--alert-texture {
134+
@include gradient-striped;
135+
}
136+
137+
// Is this being used?
138+
.slds-theme_inverse-text,
139+
.slds-theme--inverse-text {
140+
@include inverse-links;
134141
}

0 commit comments

Comments
 (0)