File tree 1 file changed +16
-0
lines changed
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -165,6 +165,22 @@ following features:
165
165
In addition, JS APIs like ` CSSPositionTryRule ` or ` CSS.supports ` will not be
166
166
polyfilled.
167
167
168
+ ### Inline styles
169
+
170
+ Browsers provide some validation for imperatively setting inline styles.
171
+ ` el.style.color = "foo" ` and ` el.style.foo = "bar" ` do not change the inline
172
+ styles of ` el ` . This is problematic for this polyfill, as we would like to
173
+ support ` el.style.anchorName = "--foo" ` , but that won't work in browsers that
174
+ don't support the ` anchor-name ` property.
175
+
176
+ While ` el.setAttribute('style', 'anchor-name: --foo') ` or `<div
177
+ style="anchor-name: --foo" />` both work, developers are often using tools that
178
+ generate the DOM. Both React and Vue use methods that remove the unknown inline
179
+ style properties at runtime.
180
+
181
+ If you are using inline styles to set anchor-related properties and the polyfill
182
+ isn't working, verify that the inline styles are actually showing up in the DOM.
183
+
168
184
## Sponsor OddBird's OSS Work
169
185
170
186
At OddBird, we love contributing to the languages & tools developers rely on.
You can’t perform that action at this time.
0 commit comments