@@ -9,7 +9,6 @@ export function createMainStyles(
9
9
themes : FeedbackThemes ,
10
10
) : HTMLStyleElement {
11
11
const style = d . createElement ( 'style' ) ;
12
- const theme = colorScheme === 'system' ? themes . light : themes [ colorScheme ] ;
13
12
style . textContent = `
14
13
:host {
15
14
--bottom: 1rem;
@@ -26,16 +25,17 @@ export function createMainStyles(
26
25
27
26
z-index: var(--zIndex);
28
27
29
- font-family: ${ theme . fontFamily } ;
30
- font-size: ${ theme . fontSize } ;
31
- --bg-color: ${ theme . background } ;
32
- --bg-hover-color: ${ theme . backgroundHover } ;
33
- --fg-color: ${ theme . foreground } ;
34
- --error-color: ${ theme . error } ;
35
- --success-color: ${ theme . success } ;
36
- --border: ${ theme . border } ;
37
- --box-shadow: ${ theme . boxShadow } ;
28
+ font-family: ${ themes . light . fontFamily } ;
29
+ font-size: ${ themes . light . fontSize } ;
30
+ --bg-color: ${ themes . light . background } ;
31
+ --bg-hover-color: ${ themes . light . backgroundHover } ;
32
+ --fg-color: ${ themes . light . foreground } ;
33
+ --error-color: ${ themes . light . error } ;
34
+ --success-color: ${ themes . light . success } ;
35
+ --border: ${ themes . light . border } ;
36
+ --box-shadow: ${ themes . light . boxShadow } ;
38
37
}
38
+
39
39
${
40
40
colorScheme === 'system'
41
41
? `
51
51
}
52
52
}
53
53
`
54
- : ''
54
+ : `
55
+ :host-context([data-sentry-feedback-colorscheme="dark"]) {
56
+ font-family: ${ themes . dark . fontFamily } ;
57
+ font-size: ${ themes . dark . fontSize } ;
58
+ --bg-color: ${ themes . dark . background } ;
59
+ --bg-hover-color: ${ themes . dark . backgroundHover } ;
60
+ --fg-color: ${ themes . dark . foreground } ;
61
+ --error-color: ${ themes . dark . error } ;
62
+ --success-color: ${ themes . dark . success } ;
63
+ --border: ${ themes . dark . border } ;
64
+ --box-shadow: ${ themes . dark . boxShadow } ;
65
+ }
66
+ `
55
67
} `;
56
68
57
69
return style ;
0 commit comments