pub const VARS_ATTR: &str = "data-vars";Expand description
The attribute an element’s custom properties ride in, instead of style.
A number this crate hands the stylesheet, a bar’s value and its axis, a
facet’s depth, a meter’s fill, is a custom property the rules divide or
multiply. A style-src without 'unsafe-inline' refuses every style
attribute, so a page under that policy would draw every chart flat from
style="--value: 4210". The same text in this
attribute is data a policy does not police, and the host’s script sets each
property through the CSSOM, which the policy allows: VARS_JS.
The value is --name: value pairs separated by ;, the declaration syntax
the style attribute already had, so the numbers still reach the markup as
themselves. That is the property the residual seam needs: see the
chart module header.
Only custom properties. A script that applied any declaration from markup would hand the policy’s refusal straight back.