Skip to content

Commit b1620c3

Browse files
authored
Ensure dark colors are always used in tutorial hero. (#760) (#763)
Since this component is meant to always be rendered with a dark color scheme regardless of the user chosen setting, there may be some elements (like asides) that may look broken in light mode since they are trying to use light color scheme colors on the dark background. Resolves: rdar://118359891
1 parent 14986dc commit b1620c3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/components/Tutorial/Hero.vue

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,20 @@ export default {
193193
background-color: var(--color-tutorial-hero-background);
194194
color: var(--color-tutorial-hero-text);
195195
position: relative;
196+
197+
&.dark {
198+
@media screen {
199+
// ensure dark colors are always used, regardless of the selected
200+
// light/dark/auto color scheme preference
201+
//
202+
// unfortunately the order of the property declaration matters here due
203+
// to the way that some properties refer to others, which is why both the
204+
// light and the dark vars are included here, even though the dark ones
205+
// override the light ones...
206+
@include color-vars-light;
207+
@include color-vars-dark;
208+
}
209+
}
196210
}
197211
198212
.bg {

0 commit comments

Comments
 (0)