Skip to content

[css-values-5] attr-type values are missing type braces #10159

@pyoor

Description

@pyoor

The attr-type values are missing the "type" notation. I.e. <string>, <url>, <ident>, etc.

: <dfn>string</dfn>
:: The [=substitution value=] is a CSS string,
whose value is the literal value of the attribute.
(No CSS parsing or "cleanup" of the value is performed.)
No value triggers fallback.
: <dfn>url</dfn>
:: The [=substitution value=] is a CSS <<url>> value,
whose url is the literal value of the attribute.
(No CSS parsing or "cleanup" of the value is performed.)
Note: If ''url()'' was syntactically capable of containing functions,
''attr(foo url)'' would be identical to ''url(attr(foo string))''.
No value triggers fallback.
: <dfn>ident</dfn>
:: The [=substitution value=] is a CSS <<custom-ident>>,
whose value is the literal value of the attribute,
with [=strip leading and trailing ASCII whitespace|leading and trailing ASCII whitespace stripped=].
(No CSS parsing of the value is performed.)
If the attribute value,
after trimming,
is the empty string,
there is instead no [=substitution value=].
If the <<custom-ident>>’s value is a [=CSS-wide keyword=]
or <css>default</css>,
there is instead no [=substitution value=].
: <dfn>color</dfn>
::
[=Parse a component value=] from the attribute's value.
If the result is a <<hex-color>>
or a [=named color=] ident,
the [=substitution value=] is that result as a <<color>>.
Otherwise there is no [=substitution value=].
: <dfn>number</dfn>
::
[=Parse a component value=] from the attribute's value.
If the result is a <<number-token>>,
the result is the [=substitution value=].
Otherwise, there is no [=substitution value=].
: <dfn>percentage</dfn>
::
[=Parse a component value=] from the attribute's value.
If the result is a <<percentage-token>>,
the result is the [=substitution value=].
Otherwise, there is no [=substitution value=].
: <dfn>length</dfn>
: <dfn>angle</dfn>
: <dfn>time</dfn>
: <dfn>frequency</dfn>
: <dfn>flex</dfn>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions