Skip to content

Commit 36f3ad3

Browse files
committed
[css-values-5] Make the attr() substitution algo properly handle the legacy fallback behavior. #11818
1 parent d528c7c commit 36f3ad3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

css-values-5/Overview.bs

+5-3
Original file line numberDiff line numberDiff line change
@@ -1716,9 +1716,11 @@ Attribute Value Substitution: the ''attr()'' notation</h4>
17161716
Let |fallback| be the <<declaration-value>>? argument specified in the function,
17171717
or the [=guaranteed-invalid value=] if it was omitted.
17181718

1719-
2. If there is no attribute named |attr name| on |el|,
1720-
return the [=guaranteed-invalid value=] and |fallback|.
1721-
Otherwise, let |attr value| be that attribute's value.
1719+
2. Let |attr value| be the value of the |attr name| attribute on |el|.
1720+
1721+
If such an attribute does not exist,
1722+
return an empty CSS string if |syntax| is null,
1723+
or the [=guaranteed-invalid value=] and |fallback| otherwise.
17221724

17231725
3. If |syntax| is null,
17241726
return a CSS <<string>>

0 commit comments

Comments
 (0)