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
I'm experimenting with the new @property at-rule and feel that it should include the ability to use syntax in conjunction with custom property fallback value.
For example, let's say I want to create a special --width custom property that accepts fractions (such as 1/2, 2/5) in addition to all the values allowed by the built-in width property including the unitless 0, <percentage-length>, as well as all the keywords such as auto, min-content, max-content, fit-content.
Currently it's not possible to do so, but if we allow syntax checking with fallback, we can do:
And I don't really understand what you are proposing.
Currently, once you specify @property for a custom property, you can no longer use a fallback value because @property mandates an initial-value if you define a syntax other than syntax: "*".
The initial-value takes over the functionality of the fallback value.
This leaves two gaps in functionality:
You can no longer use different fallback values for the same custom property, because the initial-value is defined once globally.
You can no longer use custom property within the fallback (initial-value) of another custom property, because @property does not support it.
I'm experimenting with the new
@property
at-rule and feel that it should include the ability to usesyntax
in conjunction with custom property fallback value.For example, let's say I want to create a special
--width
custom property that accepts fractions (such as1/2
,2/5
) in addition to all the values allowed by the built-inwidth
property including the unitless0
,<percentage-length>
, as well as all the keywords such asauto
,min-content
,max-content
,fit-content
.Currently it's not possible to do so, but if we allow syntax checking with fallback, we can do:
So this is why I would like the spec to allow combining fallback with syntax checking.
The text was updated successfully, but these errors were encountered: