Skip to content

Commit 63ff906

Browse files
committed
Prevents extra utility classes being loaded
1 parent 189c997 commit 63ff906

File tree

16 files changed

+110
-108
lines changed

16 files changed

+110
-108
lines changed

src/webviews/apps/commitDetails/commitDetails.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
@use '../shared/styles/details-base';
2-
@import '../shared/utils';
2+
@use '../shared/styles/utils';
33

4-
@include dark-theme {
4+
@include utils.dark-theme {
55
--gl-color-background-counter: #fff;
66
}
77

8-
@include light-theme {
8+
@include utils.light-theme {
99
--gl-color-background-counter: #000;
1010
}
1111

src/webviews/apps/home/home.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
@use '../shared/styles/properties';
22
@use '../shared/styles/theme';
33
@use '../shared/styles/scrollbars';
4-
@import '../shared/utils.scss';
4+
@use '../shared/styles/utils';
55

6-
@include dark-theme {
6+
@include utils.dark-theme {
77
--popover-bg: var(--color-background--lighten-15);
88
--gl-card-background: color-mix(in lab, var(--vscode-sideBar-background) 100%, #fff 6%);
99
}
1010

11-
@include light-theme {
11+
@include utils.light-theme {
1212
--popover-bg: var(--color-background--darken-15);
1313
--gl-card-background: color-mix(in lab, var(--vscode-sideBar-background) 100%, #000 4%);
1414
}

src/webviews/apps/plus/graph/graph.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
@use '../../shared/styles/theme';
2+
@use '../../shared/styles/utils';
23
@import '../../shared/base';
34
@import '../../shared/codicons';
45
@import '../../shared/glicons';
5-
@import '../../shared/utils';
66
@import '../../../../../node_modules/@gitkraken/gitkraken-components/dist/styles.css';
77

88
@mixin focusStyles() {
@@ -19,12 +19,12 @@ menu-list {
1919
}
2020
}
2121

22-
@include dark-theme {
22+
@include utils.dark-theme {
2323
--popover-bg: var(--color-background--lighten-15);
2424
--titlebar-bg: var(--color-background--lighten-075);
2525
}
2626

27-
@include light-theme {
27+
@include utils.light-theme {
2828
--popover-bg: var(--color-background--darken-15);
2929
--titlebar-bg: var(--color-background--darken-075);
3030
}
@@ -119,15 +119,15 @@ menu-list {
119119
--graph-column-scrollbar-thickness: 14px;
120120
}
121121

122-
@include dark-theme($selectorPrefix: ":root:has(", $selectorPostfix: ")") {
122+
@include utils.dark-theme($selectorPrefix: ':root:has(', $selectorPostfix: ')') {
123123
--graph-theme-opacity-factor: '1';
124124

125125
--color-graph-actionbar-background: color-mix(in srgb, #fff 5%, var(--color-background));
126126
--color-graph-background: color-mix(in srgb, #fff 5%, var(--color-background));
127127
--color-graph-background2: color-mix(in srgb, #fff 10%, var(--color-background));
128128
}
129129

130-
@include light-theme($selectorPrefix: ":root:has(", $selectorPostfix: ")") {
130+
@include utils.light-theme($selectorPrefix: ':root:has(', $selectorPostfix: ')') {
131131
--graph-theme-opacity-factor: '0.5';
132132

133133
--color-graph-actionbar-background: color-mix(in srgb, #000 5%, var(--color-background));

src/webviews/apps/plus/patchDetails/patchDetails.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@use '../../shared/styles/details-base';
2-
@import '../../shared/utils';
2+
@use '../../shared/styles/utils';
33

44
body {
55
--gk-menu-border-color: var(--vscode-menu-border);
@@ -49,19 +49,19 @@ gk-menu-item {
4949
color: var(--vscode-foreground);
5050
text-decoration: none;
5151

52-
@include dark-theme($selectorPostfix: " &") {
52+
@include utils.dark-theme($selectorPostfix: ' &') {
5353
background-color: var(--color-background--lighten-15);
5454
}
55-
@include light-theme($selectorPostfix: " &") {
55+
@include utils.light-theme($selectorPostfix: ' &') {
5656
background-color: var(--color-background--darken-15);
5757
}
5858
}
5959

6060
&.is-active {
61-
@include dark-theme($selectorPostfix: " &") {
61+
@include utils.dark-theme($selectorPostfix: ' &') {
6262
background-color: var(--color-background--lighten-10);
6363
}
64-
@include light-theme($selectorPostfix: " &") {
64+
@include utils.light-theme($selectorPostfix: ' &') {
6565
background-color: var(--color-background--darken-10);
6666
}
6767
}

src/webviews/apps/plus/timeline/chart.scss

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import '../../shared/utils';
1+
@use '../../shared/styles/utils';
22

33
.bb {
44
svg {
@@ -16,11 +16,11 @@
1616
}
1717

1818
path.domain {
19-
@include dark-theme($selectorPostfix: " &") {
19+
@include utils.dark-theme($selectorPostfix: ' &') {
2020
stroke: var(--color-background--lighten-15);
2121
}
2222

23-
@include light-theme($selectorPostfix: " &") {
23+
@include utils.light-theme($selectorPostfix: ' &') {
2424
stroke: var(--color-background--darken-15);
2525
}
2626
}
@@ -95,15 +95,15 @@
9595
pointer-events: none;
9696

9797
line {
98-
@include dark-theme($selectorPostfix: " &") {
98+
@include utils.dark-theme($selectorPostfix: ' &') {
9999
stroke: var(--color-background--lighten-05);
100100

101101
&.bb-ygrid {
102102
stroke: var(--color-background--lighten-05);
103103
}
104104
}
105105

106-
@include light-theme($selectorPostfix: " &") {
106+
@include utils.light-theme($selectorPostfix: ' &') {
107107
stroke: var(--color-background--darken-05);
108108

109109
&.bb-ygrid {
@@ -128,10 +128,10 @@
128128

129129
.bb-xgrid-focus {
130130
line {
131-
@include dark-theme($selectorPostfix: " &") {
131+
@include utils.dark-theme($selectorPostfix: ' &') {
132132
stroke: var(--color-background--lighten-30);
133133
}
134-
@include light-theme($selectorPostfix: " &") {
134+
@include utils.light-theme($selectorPostfix: ' &') {
135135
stroke: var(--color-background--darken-30);
136136
}
137137
}
@@ -175,11 +175,11 @@
175175
// .bb-selected-circle {
176176
// stroke-width: 2px;
177177

178-
// @include dark-theme($selectorPostfix: " &") {
178+
// @include utils.dark-theme($selectorPostfix: " &") {
179179
// fill: rgba(255, 255, 255, 0.2);
180180
// }
181181

182-
// @include light-theme($selectorPostfix: " &") {
182+
// @include utils.light-theme($selectorPostfix: " &") {
183183
// fill: rgba(0, 0, 0, 0.1);
184184
// }
185185
// }
@@ -235,12 +235,12 @@
235235

236236
/*-- Zoom region --*/
237237
.bb-zoom-brush {
238-
@include dark-theme($selectorPostfix: " &") {
238+
@include utils.dark-theme($selectorPostfix: ' &') {
239239
fill: white;
240240
fill-opacity: 0.2;
241241
}
242242

243-
@include light-theme($selectorPostfix: " &") {
243+
@include utils.light-theme($selectorPostfix: ' &') {
244244
fill: black;
245245
fill-opacity: 0.1;
246246
}

src/webviews/apps/plus/timeline/timeline.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
@use '../../shared/styles/properties';
22
@use '../../shared/styles/theme';
3-
@import '../../shared/utils';
3+
@use '../../shared/styles/utils';
44

55
* {
66
box-sizing: border-box;
77
}
88

9-
@include dark-theme {
9+
@include utils.dark-theme {
1010
--progress-bar-color: var(--color-background--lighten-15);
1111
--card-background: var(--color-background--lighten-075);
1212
--card-hover-background: var(--color-background--lighten-10);
1313
--popover-bg: var(--color-background--lighten-15);
1414
}
1515

16-
@include light-theme {
16+
@include utils.light-theme {
1717
--progress-bar-color: var(--color-background--darken-15);
1818
--card-background: var(--color-background--darken-075);
1919
--card-hover-background: var(--color-background--darken-10);

src/webviews/apps/rebase/rebase.scss

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@use '../shared/styles/theme';
2+
@use '../shared/styles/utils';
23
@import '../shared/base';
34
@import '../shared/buttons';
45
@import '../shared/utils';
@@ -8,7 +9,7 @@ body {
89
overflow: overlay;
910
}
1011

11-
@include dark-theme {
12+
@include utils.dark-theme {
1213
--avatar-bg: var(--color-background--lighten-30);
1314
}
1415
.vscode-light {
@@ -166,10 +167,10 @@ $entry-padding: 7px;
166167
top: 0;
167168
transform: translateX(-50%);
168169

169-
@include dark-theme($selectorPostfix: " &") {
170+
@include utils.dark-theme($selectorPostfix: ' &') {
170171
border-right-color: var(--color-background--lighten-15);
171172
}
172-
@include light-theme($selectorPostfix: " &") {
173+
@include utils.light-theme($selectorPostfix: ' &') {
173174
border-right-color: var(--color-background--darken-15);
174175
}
175176
}
@@ -316,12 +317,12 @@ $entry-padding: 7px;
316317
.entry-blocked {
317318
width: 100%;
318319

319-
@include dark-theme($selectorPostfix: " &") {
320+
@include utils.dark-theme($selectorPostfix: ' &') {
320321
background: rgba(255, 255, 255, 0.1);
321322
box-shadow: 0px -1px 0px 0px rgba(255, 255, 255, 0.2);
322323
}
323324

324-
@include light-theme($selectorPostfix: " &") {
325+
@include utils.light-theme($selectorPostfix: ' &') {
325326
background: rgba(0, 0, 0, 0.1);
326327
box-shadow: 0px -1px 0px 0px rgba(0, 0, 0, 0.2);
327328
}
@@ -345,11 +346,11 @@ $entry-padding: 7px;
345346
margin-left: 10px;
346347
cursor: ns-resize;
347348

348-
@include dark-theme($selectorPostfix: " &") {
349+
@include utils.dark-theme($selectorPostfix: ' &') {
349350
border-color: var(--color-foreground--75);
350351
}
351352

352-
@include light-theme($selectorPostfix: " &") {
353+
@include utils.light-theme($selectorPostfix: ' &') {
353354
border-color: var(--color-foreground--75);
354355
}
355356
}
@@ -419,7 +420,7 @@ $entry-padding: 7px;
419420
margin: 0 10px;
420421
opacity: 0.5;
421422

422-
@include light-theme($selectorPostfix: " &") {
423+
@include utils.light-theme($selectorPostfix: ' &') {
423424
opacity: 0.6;
424425
}
425426

src/webviews/apps/settings/settings.scss

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
@use '../shared/styles/theme';
2+
@use '../shared/styles/utils';
23
@import '../shared/base';
34
@import '../shared/buttons';
45
@import '../shared/icons';
5-
@import '../shared/utils';
66

77
body {
88
font-family: var(--vscode-font-family);
99
font-weight: var(--vscode-font-weight);
1010
font-size: var(--vscode-font-size) !important;
1111
line-height: 1.4;
1212

13-
@include light-theme($selectorPrefix: "&") {
13+
@include utils.light-theme($selectorPrefix: '&') {
1414
background-color: var(--color-background--darken-05);
1515
}
1616
}
@@ -78,7 +78,7 @@ a.secondary {
7878
color: var(--color-foreground--85);
7979
}
8080

81-
@include light-theme($selectorPostfix: " &") {
81+
@include utils.light-theme($selectorPostfix: ' &') {
8282
color: var(--color-foreground--75);
8383
}
8484
}
@@ -121,11 +121,11 @@ a.secondary {
121121
grid-area: content;
122122
font-size: 1.4rem;
123123

124-
@include dark-theme($selectorPostfix: " &") {
124+
@include utils.dark-theme($selectorPostfix: ' &') {
125125
background-color: var(--color-background--lighten-05);
126126
}
127127

128-
@include light-theme($selectorPostfix: " &") {
128+
@include utils.light-theme($selectorPostfix: ' &') {
129129
background-color: var(--color-background);
130130
}
131131

@@ -198,7 +198,7 @@ a.secondary {
198198
z-index: 1;
199199
grid-column: span 1;
200200

201-
@include light-theme($selectorPostfix: " &") {
201+
@include utils.light-theme($selectorPostfix: ' &') {
202202
background: var(--color-background--darken-05);
203203
}
204204
}
@@ -336,17 +336,17 @@ section {
336336
margin: 1em;
337337
padding: 1em;
338338

339-
@include dark-theme($selectorPostfix: " &") {
339+
@include utils.dark-theme($selectorPostfix: ' &') {
340340
background: var(--color-background--lighten-075);
341341
}
342342

343-
@include light-theme($selectorPostfix: " &") {
343+
@include utils.light-theme($selectorPostfix: ' &') {
344344
background: var(--color-background--darken-05);
345345
}
346346
}
347347

348348
.section--collapsible {
349-
@include light-theme($selectorPostfix: " &") {
349+
@include utils.light-theme($selectorPostfix: ' &') {
350350
background: var(--color-background);
351351
}
352352

@@ -872,7 +872,7 @@ section {
872872
height: 1em;
873873
padding-bottom: 4px;
874874

875-
@include light-theme($selectorPostfix: " &") {
875+
@include utils.light-theme($selectorPostfix: ' &') {
876876
border-left-color: var(--color-link-foreground--lighten-20);
877877
}
878878
}

0 commit comments

Comments
 (0)