You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The <dfnid='value-type'><var><value></var></dfn> type used in the syntax above is defined as
122
+
anything matching the "value" production in <ahref="http://www.w3.org/TR/CSS2/syndata.html#tokenization">CSS 2.1 Chapter 4.1</a> [[!CSS21]].
123
+
This puts almost no restrictions on what kinds of values you can store in variables.
124
+
Obviously, any valid property value
125
+
or component of a property
126
+
is allowed.
127
+
Additionally, this allows things that aren't yet valid CSS,
128
+
like unknown keywords or functions,
129
+
blocks,
130
+
at-rules,
131
+
and other kinds of custom micro-syntaxes like what's allowed in calc().
132
+
There <em>are</em> still rules, however;
133
+
for example,
134
+
unbalanced parentheses are invalid.
124
135
125
136
<p><em>Any</em> property name starting with the prefix "var-" is a <i>variable property</i>. Variable properties are defined to be valid but meaningless as they are meant solely for allowing authors to pass custom data around their page, similar to the <ahref="http://www.w3.org/TR/html5/global-attributes.html#embedding-custom-non-visible-data-with-the-data-attributes">custom data attributes</a> in HTML. Other specifications and user agents must not assign a particular meaning to <i>variable properties</i> or attach a specific effect to them beyond the bare minimum that comes from them being valid properties.</p>
0 commit comments