File tree 2 files changed +14
-8
lines changed
components/modules/shared
2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ export async function AccentColorStyleInjector({
49
49
const [ hl , sl , ll ] = lightOklch
50
50
const [ hd , sd , ld ] = darkOklch
51
51
52
+ const [ lightBgImage , darkBgImage ] = await Promise . all ( [
53
+ createPngNoiseBackground ( currentAccentColorLRef ) ,
54
+ createPngNoiseBackground ( currentAccentColorDRef ) ,
55
+ ] )
56
+
52
57
return (
53
58
< style
54
59
id = "accent-color-style"
@@ -57,10 +62,10 @@ export async function AccentColorStyleInjector({
57
62
dangerouslySetInnerHTML = { {
58
63
__html : `
59
64
html[data-theme='light'].noise body::before {
60
- background-image: ${ await createPngNoiseBackground ( currentAccentColorLRef ) }
65
+ background-image: ${ lightBgImage }
61
66
}
62
67
html[data-theme='dark'].noise body::before {
63
- background-image: ${ await createPngNoiseBackground ( currentAccentColorDRef ) }
68
+ background-image: ${ darkBgImage }
64
69
}
65
70
html[data-theme='light'] {
66
71
--a: ${ `${ hl } ${ sl } ${ ll } ` } ;
Original file line number Diff line number Diff line change 1
1
html {
2
- --border-color : # eee ;
3
2
--font-sans : theme ('fontFamily.sans' );
4
- --theme-color : var (--auto-theme-color , theme ('colors.accent' ));
5
- --hover-color : var (--auto-hover-color , theme ('colors.accent/80' ));
6
- --header-height : auto;
3
+
7
4
/* Accent color for form controls */
8
- accent-color : var ( -- theme-color );
5
+ accent-color : theme (colors.accent );
9
6
10
7
/* make app like native app in mobile */
11
8
-webkit-tap-highlight-color : transparent;
@@ -27,11 +24,15 @@ details summary {
27
24
}
28
25
29
26
::selection {
30
- background-color : var ( -- theme-color ) !important ;
27
+ background-color : theme (colors.accent) ;
31
28
color : theme (colors.white) !important ;
32
29
text-shadow : none;
33
30
}
34
31
32
+ [data-theme = 'dark' ] ::selection {
33
+ background-color : theme (colors.accent/0.3);
34
+ }
35
+
35
36
::view-transition-new (root ) {
36
37
animation : turnOff 800ms ease-in-out;
37
38
}
You can’t perform that action at this time.
0 commit comments