Implement the augmentation to attr() specified in CSS Level 5, which allows types besides <string> and usage in all CSS properties (besides pseudo-element 'content'). Example: <style> div { background-color: attr(data-foo type(<color>), red); } </style> <div data-foo="blue">test</div>
No browser has implemented this feature yet. Even though there's no negative signals from other browsers, there's still a minimal interoperability risk that we end up the only implementation. There are also a few known cases where this advanced version behaves differently from the basic version in pseudo-element content property, which is a compatibility risk: - https://bit.ly/2XDhHtg - https://bit.ly/3grF3ur
attr() can be used by injected CSS for data exfiltration. https://github.com/w3c/csswg-drafts/issues/5092
Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?
None
No additional DevTools support is needed. attr() function is inspectable in DevTools same way as any other CSS substitution function.
https://wpt.fyi/results/css/css-values?label=master&label=experimental&aligned&q=attr
Shipping on desktop | 133 |
Shipping on Android | 133 |
Shipping on WebView | 133 |
Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).
None