Skip to content

Commit b2c75d9

Browse files
committed
Replace inline global selectors with a modern-ui SCSS mixin
- create a mixin for [Fragment] ├── apps │ └── editor │ └── src │ └── views │ └── prompt │ └── frontend │ ├── Home │ │ └── Home.module.scss │ ├── Main │ │ └── MainView │ │ ├── MainView.module.scss │ │ └── components │ │ └── Header │ │ └── Header.module.scss │ └── components │ └── Layout │ └── Footer │ └── Footer.module.scss └── packages └── ui └── src ├── components │ └── editor │ ├── common │ │ └── DropdownMenu │ │ └── DropdownMenu.module.scss │ ├── prompt │ │ ├── BrowserExtensionMessage │ │ │ └── BrowserExtensionMessage.module.scss │ │ ├── Configurations │ │ │ └── Configurations.module.scss │ │ ├── Page │ │ │ └── Page.module.scss │ │ ├── ResponsePreview │ │ │ ├── ResponsePreview.module.scss │ │ │ └── components │ │ │ ├── FileItem │ │ │ │ └── FileItem.module.scss │ │ │ └── TextItem │ │ │ └── TextItem.module.scss │ │ ├── Responses │ │ │ └── Responses.module.scss │ │ ├── StatusBar │ │ │ └── StatusBar.module.scss │ │ ├── Tabs │ │ │ └── Tabs.module.scss │ │ ├── Tasks │ │ │ └── Tasks.module.scss │ │ └── modals │ │ └── OngoingApiCallsModal │ │ └── OngoingApiCallsModal.module.scss │ └── settings │ └── Layout │ └── Layout.module.scss └── styles ├── foundation │ ├── _colors.scss │ ├── _index.scss │ ├── _mixins.scss │ └── _variables.scss └── global.scss
1 parent 9892b62 commit b2c75d9

18 files changed

Lines changed: 39 additions & 33 deletions

File tree

‎apps/editor/src/views/prompt/frontend/Home/Home.module.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
transform var(--transition-duration-250) var(--transition-timing-function),
1919
opacity var(--transition-duration-250) var(--transition-timing-function);
2020

21-
:global([data-modern-ui='true']) & {
21+
@include modern-ui {
2222
padding: 0 10px;
2323
}
2424

@@ -94,7 +94,7 @@
9494
border-radius: 10px;
9595
position: relative;
9696

97-
:global([data-modern-ui='true']) & {
97+
@include modern-ui {
9898
margin: 0 10px;
9999
}
100100

‎apps/editor/src/views/prompt/frontend/Main/MainView/MainView.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
gap: 6px;
55
margin: 0 12px;
66

7-
:global([data-modern-ui='true']) & {
7+
@include modern-ui {
88
margin: 0 10px;
99
}
1010
}

‎apps/editor/src/views/prompt/frontend/Main/MainView/components/Header/Header.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
gap: 8px;
88
height: var(--height);
99

10-
:global([data-modern-ui='true']) & {
10+
@include modern-ui {
1111
padding: 0 10px;
1212
}
1313

‎apps/editor/src/views/prompt/frontend/components/Layout/Footer/Footer.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
border-top: 1px solid var(--cwc-border-color-dimmed);
88
gap: 4px;
99

10-
:global([data-modern-ui='true']) & {
10+
@include modern-ui {
1111
padding: 6px 4px;
1212
}
1313

‎packages/ui/src/components/editor/common/DropdownMenu/DropdownMenu.module.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
box-shadow: 0 0 8px 2px var(--vscode-widget-shadow);
1616
overflow: hidden;
1717

18-
:global([data-modern-ui='true']) & {
18+
@include modern-ui {
1919
:global {
2020
.simplebar-track.simplebar-vertical {
2121
margin: 4px 0;
@@ -81,7 +81,7 @@
8181
}
8282

8383
&--disabled {
84-
opacity: var(--disabled-opacity);
84+
opacity: var(--disabled-opacity);
8585
cursor: default;
8686
}
8787
}

‎packages/ui/src/components/editor/prompt/BrowserExtensionMessage/BrowserExtensionMessage.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
border-radius: 6px;
1111
margin: 0 20px;
1212

13-
:global([data-modern-ui='true']) & {
13+
@include modern-ui {
1414
margin: 0 18px;
1515
}
1616
}

‎packages/ui/src/components/editor/prompt/Configurations/Configurations.module.scss‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
height: 22px;
1919
padding: 0 12px;
2020

21-
:global([data-modern-ui='true']) & {
21+
@include modern-ui {
2222
margin: 0 4px;
2323
padding: 0 6px;
2424
border-radius: var(--border-radius-small);
@@ -111,7 +111,7 @@
111111
background-color: var(--vscode-menu-separatorBackground);
112112
margin: 4px 0;
113113

114-
:global([data-modern-ui='true']) & {
114+
@include modern-ui {
115115
margin: 4px 8px;
116116
}
117117
}
@@ -126,7 +126,7 @@
126126
height: 100%;
127127
color: var(--cwc-text-color-dimmed);
128128

129-
:global([data-modern-ui='true']) & {
129+
@include modern-ui {
130130
padding: 4px 10px 3px 10px;
131131
}
132132
}
@@ -135,7 +135,7 @@
135135
display: flex;
136136
padding: 10px 12px 0 12px;
137137

138-
:global([data-modern-ui='true']) & {
138+
@include modern-ui {
139139
padding: 9px 10px 0 10px;
140140
}
141141

‎packages/ui/src/components/editor/prompt/Page/Page.module.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
margin: 6px 12px;
1414
position: relative;
1515

16-
:global([data-modern-ui='true']) & {
16+
@include modern-ui {
1717
margin: 6px 10px;
1818
}
1919

@@ -31,7 +31,7 @@
3131
padding: 10px 12px;
3232
border-top: 1px solid var(--cwc-border-color-dimmed);
3333

34-
:global([data-modern-ui='true']) & {
34+
@include modern-ui {
3535
padding: 10px;
3636
}
3737
}

‎packages/ui/src/components/editor/prompt/ResponsePreview/ResponsePreview.module.scss‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
padding: 4px 0 12px 0;
55
gap: 8px;
66

7-
:global([data-modern-ui='true']) & {
7+
@include modern-ui {
88
padding: 4px 0 10px 0;
99
}
1010
}
@@ -19,7 +19,7 @@
1919
border-radius: 8px;
2020
overflow: hidden;
2121

22-
:global([data-modern-ui='true']) & {
22+
@include modern-ui {
2323
margin: 0 10px;
2424
}
2525

@@ -94,7 +94,7 @@
9494
-webkit-line-clamp: unset;
9595
}
9696

97-
:global([data-modern-ui='true']) & {
97+
@include modern-ui {
9898
margin: 0 10px;
9999
}
100100

@@ -116,7 +116,7 @@
116116
border-radius: 6px;
117117
background-color: var(--cwc-bg-tertiary);
118118

119-
:global([data-modern-ui='true']) & {
119+
@include modern-ui {
120120
margin: 0 10px;
121121
}
122122

@@ -209,7 +209,7 @@
209209
overflow: hidden;
210210
text-overflow: ellipsis;
211211

212-
:global([data-modern-ui='true']) & {
212+
@include modern-ui {
213213
margin: 4px 10px 0 10px;
214214
}
215215
}

‎packages/ui/src/components/editor/prompt/ResponsePreview/components/FileItem/FileItem.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
border-radius: 8px;
3737
cursor: pointer;
3838

39-
:global([data-modern-ui='true']) & {
39+
@include modern-ui {
4040
margin: 0 10px;
4141
}
4242

0 commit comments

Comments
 (0)