Commit 0c3ef0e
committed
fix(checkbox): ensure correct rendering on iOS & macOS 26
Safari (macOS & iOS, tested on Safari 26) & probably even earlier versions have
a rendering bug where transitions on descendants whose end state is triggered
ONLY via a parent selector using `:has()` may not animate. Instead, Safari
sometimes jumps directly to the final state (or never paints the transition)
until a subsequent layout invalidation (e.g. tab switch, resize) happens.
Now we are using an equivalent selector that does NOT rely on `:has()`,
using the adjacency between the input and the visual box. This ensures the
transitions for the check mark & background color run reliably in Safari
while keeping the simpler `:has()` version commented for future re-implementation
or cleanup.1 parent df3c380 commit 0c3ef0e
File tree
2 files changed
+77
-13
lines changed- src
- components/checkbox
- style/internal
2 files changed
+77
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
83 | 112 | | |
84 | | - | |
| 113 | + | |
85 | 114 | | |
86 | | - | |
87 | | - | |
88 | | - | |
| 115 | + | |
| 116 | + | |
89 | 117 | | |
90 | 118 | | |
91 | 119 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
113 | 135 | | |
114 | | - | |
115 | | - | |
| 136 | + | |
| 137 | + | |
116 | 138 | | |
117 | 139 | | |
118 | 140 | | |
| |||
127 | 149 | | |
128 | 150 | | |
129 | 151 | | |
130 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
131 | 160 | | |
132 | 161 | | |
133 | 162 | | |
134 | 163 | | |
135 | | - | |
| 164 | + | |
136 | 165 | | |
137 | 166 | | |
138 | 167 | | |
| |||
145 | 174 | | |
146 | 175 | | |
147 | 176 | | |
148 | | - | |
149 | | - | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
150 | 186 | | |
151 | | - | |
152 | 187 | | |
153 | 188 | | |
154 | 189 | | |
| |||
171 | 206 | | |
172 | 207 | | |
173 | 208 | | |
174 | | - | |
| 209 | + | |
| 210 | + | |
175 | 211 | | |
176 | 212 | | |
177 | 213 | | |
| |||
0 commit comments