Skip to content

Commit 0fedf45

Browse files
authored
Merge pull request #1467 from nbelyh/dark-mode-fixes
Use theme colors - fix dark mode, RichText and FilePicker
2 parents e9cf6d9 + fc33c3d commit 0fedf45

File tree

10 files changed

+143
-104
lines changed

10 files changed

+143
-104
lines changed

src/controls/filePicker/FilePicker.module.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
padding-bottom: 0px;
4343
padding-left: 15px;
4444
height: 36px;
45-
color: $ms-color-neutralPrimary;
45+
color: "[theme:neutralPrimary, default:#{$ms-color-neutralPrimary}]";
4646
background-color: transparent;
4747
width: 100%;
4848
line-height: 36px;
@@ -73,8 +73,8 @@
7373
padding-bottom: 0px;
7474
padding-left: 15px;
7575
height: 36px;
76-
color: $ms-color-themePrimary;
77-
background-color: $ms-color-neutralLighter;
76+
color: "[theme:themePrimary, default:#{$ms-color-themePrimary}]";
77+
background-color: "[theme:neutralLighter, default:#{$ms-color-neutralLighter}]";
7878
width: 100%;
7979
line-height: 36px;
8080
text-overflow: ellipsis;
@@ -118,7 +118,7 @@
118118
.nav {
119119
position: absolute;
120120
height: 100%;
121-
color: $ms-color-neutralLighter;
121+
color: "[theme:neutralLighter, default:#{$ms-color-neutralLighter}]";
122122
}
123123

124124
[dir="ltr"] .nav {
@@ -134,13 +134,13 @@
134134
box-sizing: border-box;
135135
border-top-width: 40px;
136136
border-top-style: solid;
137-
color: $ms-color-neutralLighter;
137+
color: "[theme:neutralLighter, default:#{$ms-color-neutralLighter}]";
138138
}
139139

140140
.tabHeaderContainer {
141141
display: inline-block;
142142
width: 100%;
143-
color: $ms-color-neutralLighter;
143+
color: "[theme:neutralLighter, default:#{$ms-color-neutralLighter}]";
144144
border-top: 40px solid;
145145
}
146146

@@ -149,7 +149,7 @@
149149
padding: 22px 32px;
150150
}
151151
.breadcrumbNavItem {
152-
color: $ms-color-neutralPrimary;
152+
color: "[theme:neutralPrimary, default:#{$ms-color-neutralPrimary}]";
153153
font-size: 24px;
154154
font-weight: 600;
155155
padding: 22px 8px 20px 0;
@@ -189,7 +189,7 @@
189189
-ms-flex-direction: column;
190190
flex-direction: column;
191191
width: 100%;
192-
background-color: $ms-color-white;
192+
background-color: "[theme:white, default:#{$ms-color-white}]";
193193
-ms-flex-negative: 0;
194194
flex-shrink: 0;
195195
z-index: 100;
@@ -232,7 +232,7 @@
232232
}
233233

234234
.tabHeader {
235-
color: $ms-color-neutralPrimary;
235+
color: "[theme:neutralPrimary, default:#{$ms-color-neutralPrimary}]";
236236
margin: 0;
237237
font-size: 24px;
238238
font-weight: 600;

src/controls/filePicker/MultipleUploadFilePickerTab/MultipleUploadFilePickerTab.module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
}
1515

1616
.localTabFilename {
17-
color: $ms-color-neutralPrimary;
17+
color: "[theme:neutralPrimary, default:#{$ms-color-neutralPrimary}]";
1818
}
1919

2020
.localTabLabel {
21-
color: $ms-color-themePrimary;
21+
color: "[theme:themePrimary, default:#{$ms-color-themePrimary}]";
2222
cursor: pointer;
2323
}
2424

@@ -33,7 +33,7 @@
3333

3434
.localTabDragDropFile {
3535
// width: 100%;
36-
border: 1px black dashed;
36+
border: 1px "[theme:black, default:#{$ms-color-black}]" dashed;
3737
text-align: center;
3838
padding: 75px;
3939
}

src/controls/filePicker/RecentFilesTab/RecentFilesTab.module.scss

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
.itemTile.isFile,
2020
.itemTile.isPhoto,
2121
.itemTile.isVideo {
22-
background-color: $ms-color-neutralLighter;
22+
background-color: "[theme:neutralLighter, default:#{$ms-color-neutralLighter}]";
2323
}
2424

2525
.itemTile {
@@ -60,9 +60,9 @@
6060
top: 2px;
6161
bottom: 2px;
6262
border: 1px solid;
63-
border-color: $ms-color-white;
64-
-webkit-box-shadow: 0 0 0 2px $ms-color-neutralSecondaryAlt;
65-
box-shadow: 0 0 0 2px $ms-color-neutralSecondaryAlt;
63+
border-color: "[theme:white, default:#{$ms-color-white}]";
64+
-webkit-box-shadow: 0 0 0 2px "[theme:neutralSecondaryAlt, default:#{$ms-color-neutralSecondaryAlt}]";
65+
box-shadow: 0 0 0 2px "[theme:neutralSecondaryAlt, default:#{$ms-color-neutralSecondaryAlt}]";
6666
}
6767
}
6868

@@ -79,13 +79,13 @@
7979
.itemTile.isFile .itemTileFileContainer {
8080
border-width: 1px;
8181
border-style: solid;
82-
border-color: $ms-color-neutralLight;
82+
border-color: "[theme:neutralLight, default:#{$ms-color-neutralLight}]";
8383
}
8484

8585
.itemTileFile {
8686
.itemTileFileContainer {
8787
position: absolute;
88-
background-color: $ms-color-neutralLighter;
88+
background-color: "[theme:neutralLighter, default:#{$ms-color-neutralLighter}]";
8989
left: 0;
9090
right: 0;
9191
top: 0;
@@ -143,16 +143,16 @@
143143
right: 0;
144144
min-height: 20px;
145145
padding: 4px 8px 8px;
146-
background-color: $ms-color-white;
147-
color: $ms-color-neutralPrimary;
146+
background-color: "[theme:white, default:#{$ms-color-white}]";
147+
color: "[theme:neutralPrimary, default:#{$ms-color-neutralPrimary}]";
148148
white-space: nowrap;
149149
text-overflow: ellipsis;
150150
}
151151
.itemTile.isFile .itemTileNamePlate {
152152
opacity: 0.95;
153153
border-top-width: 1px;
154154
border-top-style: solid;
155-
border-top-color: $ms-color-neutralLight;
155+
border-top-color: "[theme:neutralLight, default:#{$ms-color-neutralLight}]";
156156
min-height: 35px;
157157
}
158158

src/controls/filePicker/UploadFilePickerTab/UploadFilePickerTab.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
}
1515

1616
.localTabFilename {
17-
color: $ms-color-neutralPrimary;
17+
color: "[theme:neutralPrimary, default:#{$ms-color-neutralPrimary}]";
1818
}
1919

2020
.localTabLabel {
21-
color: $ms-color-themePrimary;
21+
color: "[theme:themePrimary, default:#{$ms-color-themePrimary}]";
2222
cursor: pointer;
2323
}
2424

src/controls/filePicker/WebSearchTab/WebSearchTab.module.scss

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
top: 2px;
8282
bottom: 2px;
8383
box-sizing: border-box;
84-
border: 1px solid $ms-color-white;
84+
border: 1px solid "[theme:white, default:#{$ms-color-white}]";
8585
}
8686

8787
.filePickerFolderCardSizer {
@@ -92,7 +92,7 @@
9292
width: 100%;
9393
left: 0;
9494
top: 0;
95-
color: $ms-color-white;
95+
color: "[theme:white, default:#{$ms-color-white}]";
9696
position: absolute;
9797
bottom: 0;
9898
font-size: 12px;
@@ -104,7 +104,7 @@
104104
height: 100%;
105105
width: 100%;
106106
top: 0;
107-
color: $ms-color-white;
107+
color: "[theme:white, default:#{$ms-color-white}]";
108108
padding: 10px;
109109
position: absolute;
110110
bottom: 0;
@@ -116,13 +116,13 @@
116116
font-weight: 600;
117117

118118
&:hover {
119-
color: $ms-color-neutralLight;
119+
color: "[theme:neutralLight, default:#{$ms-color-neutralLight}]";
120120
background-color: rgba(0, 0, 0, 0.6);
121121
}
122122

123123
&:active {
124-
background-color: $ms-color-neutralTertiaryAlt;
125-
color: $ms-color-neutralDark;
124+
background-color: "[theme:neutralTertiaryAlt, default:#{$ms-color-neutralTertiaryAlt}]";
125+
color: "[theme:neutralDark, default:#{$ms-color-neutralDark}]";
126126
}
127127
}
128128

@@ -167,15 +167,15 @@
167167
top: 2px;
168168
bottom: 2px;
169169
border: 1px solid;
170-
border-color: $ms-color-white;
171-
-webkit-box-shadow: 0 0 0 2px $ms-color-neutralSecondaryAlt;
172-
box-shadow: 0 0 0 2px $ms-color-neutralSecondaryAlt;
170+
border-color: "[theme:white, default:#{$ms-color-white}]";
171+
-webkit-box-shadow: 0 0 0 2px "[theme:neutralSecondaryAlt, default:#{$ms-color-neutralSecondaryAlt}]";
172+
box-shadow: 0 0 0 2px "[theme:neutralSecondaryAlt, default:#{$ms-color-neutralSecondaryAlt}]";
173173
}
174174
}
175175

176176
.bingTileContent {
177177
border: 1px solid;
178-
border-color: $ms-color-white;
178+
border-color: "[theme:white, default:#{$ms-color-white}]";
179179
width: 100%;
180180
height: 100%;
181181
}
@@ -187,8 +187,8 @@
187187
top: 2px;
188188
right: 2px;
189189
bottom: 2px;
190-
-webkit-box-shadow: 0 0 0 2px $ms-color-neutralTertiaryAlt;
191-
box-shadow: 0 0 0 2px $ms-color-neutralTertiaryAlt;
190+
-webkit-box-shadow: 0 0 0 2px "[theme:neutralTertiaryAlt, default:#{$ms-color-neutralTertiaryAlt}]";
191+
box-shadow: 0 0 0 2px "[theme:neutralTertiaryAlt, default:#{$ms-color-neutralTertiaryAlt}]";
192192
outline: 1px solid transparent;
193193
}
194194

@@ -213,8 +213,8 @@
213213
left: 0;
214214
right: 0;
215215
padding: 4px 8px 8px;
216-
background-color: $ms-color-white;
217-
color: $ms-color-neutralPrimary;
216+
background-color: "[theme:white, default:#{$ms-color-white}]";
217+
color: "[theme:neutralPrimary, default:#{$ms-color-neutralPrimary}]";
218218
white-space: nowrap;
219219
text-overflow: ellipsis;
220220
opacity: 0.95;

src/controls/filePicker/controls/DocumentLibraryBrowser/DocumentLibraryBrowser.module.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
top: 2px;
4242
bottom: 2px;
4343
box-sizing: border-box;
44-
border: 1px solid $ms-color-white;
44+
border: 1px solid "[theme:white, default:#{$ms-color-white}]";
4545
}
4646

4747
.filePickerFolderCardSizer {
@@ -52,19 +52,19 @@
5252
width: 100%;
5353
left: 0;
5454
top: 0;
55-
color: $ms-color-white;
55+
color: "[theme:white, default:#{$ms-color-white}]";
5656
position: absolute;
5757
bottom: 0;
5858
font-size: 12px;
5959
width: 100%;
6060
}
6161

6262
.filePickerFolderCardLabel {
63-
background-color: rgba(0, 0, 0, 0.6);
63+
background-color: "[theme:neutralLight, default:#{$ms-color-neutralLight}]";
6464
height: 100%;
6565
width: 100%;
6666
top: 0;
67-
color: $ms-color-white;
67+
color: "[theme:black, default:#{$ms-color-black}]";
6868
padding: 10px;
6969
position: absolute;
7070
bottom: 0;
@@ -81,13 +81,13 @@
8181
}
8282

8383
&:hover {
84-
color: $ms-color-neutralLight;
85-
background-color: rgba(0, 0, 0, 0.6);
84+
color: "[theme:black, default:#{$ms-color-black}]";
85+
background-color: "[theme:neutralLighter, default:#{$ms-color-neutralLighter}]";
8686
}
8787

8888
&:active {
89-
background-color: $ms-color-neutralTertiaryAlt;
90-
color: $ms-color-neutralDark;
89+
color: "[theme:black, default:#{$ms-color-black}]";
90+
background-color: "[theme:neutralLighterAlt, default:#{$ms-color-neutralLighterAlt}]";
9191
}
9292
}
9393

src/controls/filePicker/controls/FolderTile/FolderTile.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
max-height: 100%;
7878
-webkit-box-shadow: 0 1px 3px 2px rgba(1, 1, 0, 0.2);
7979
box-shadow: 0 1px 3px 2px rgba(1, 1, 0, 0.2);
80-
background-color: $ms-color-white;
80+
background-color: "[theme:white, default:#{$ms-color-white}]";
8181
min-width: 32px;
8282
min-height: 32px;
8383
}

0 commit comments

Comments
 (0)