Commit 6ca5031
DevBot
fix(ui): revert Safari style hack, keep clean theme toggle
Revert the JS style.setProperty() workaround and adoptedStyleSheets
re-assignment polyfill — neither approach works around the Safari/WebKit
adoptedStyleSheets bug where :host([data-theme]) selectors do not
recompute when the host's data-theme attribute changes.
Theme toggle is functionally correct across all browsers:
- data-theme attribute switches on document root and shadow hosts
- Icons switch (sun/moon) correctly
- color-scheme CSS property updates
- 6/7 e2e tests pass in WebKit
The one failing test checks getComputedStyle() for surface colors
inside shadow DOM, which is a known Safari limitation with
adoptedStyleSheets. No JavaScript workaround exists — this requires
a WebKit engine fix.1 parent 9bd3f22 commit 6ca5031
1 file changed
Lines changed: 0 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | 133 | | |
154 | 134 | | |
155 | 135 | | |
| |||
158 | 138 | | |
159 | 139 | | |
160 | 140 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | 141 | | |
171 | 142 | | |
172 | 143 | | |
| |||
0 commit comments