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
--custom is first unset. The border declaration is invalid at computed value time because the initial --custom value is the guaranteed-invalid value. Then --custom is set to empty string from a whitespace in the input. The border declaration computes to 1px solid with the initial border-color.
Option 1: (proposed in the comment)
changing the second argument to a space might be enough to avoid that.
But it does not round-trip:
If so, then I wonder whether getProperty on a custom property should similarly return a space if the value is an empty sequence of tokens, so as to reduce bugs where a subsequent setProperty fails to restore the value current at the time of getProperty.
Option 2:
Do not remove a custom property when provided an empty string; use .removeProperty() instead.
2. If property is not a custom property, follow these substeps:
1. Let property be property converted to ASCII lowercase.
2. If property is not a case-sensitive match for a supported CSS property, then return.
- 3. If value is the empty string, invoke removeProperty() with property as argument and return.+ 3. If value is the empty string, invoke removeProperty() with property as argument and return.
The text was updated successfully, but these errors were encountered:
This is a follow-up on this comment.
For example:
--custom
is first unset. Theborder
declaration is invalid at computed value time because the initial--custom
value is the guaranteed-invalid value. Then--custom
is set to empty string from a whitespace in the input. Theborder
declaration computes to1px solid
with the initialborder-color
.Option 1: (proposed in the comment)
But it does not round-trip:
Option 2:
Do not remove a custom property when provided an empty string; use
.removeProperty()
instead.The text was updated successfully, but these errors were encountered: