-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ApplyShim does not correctly handle values of inherit
or initial
in mixins
#3818
Comments
Variable assignment is early bound. This means that assigning a value of
Cannot be shimmed to To get this value, we can do something like this:
|
To handle a value of
Cannot be shimmed as In some rule like this |
The apply shim uses
initial
as a special value to help it forward default values to properties. Consider:In this case, if
--foo
does not contain a border property, elements matching.foo
will have a 2px red border. Under the apply shim, if one setting of--foo
containsborder
and another does not, we ensure that all--foo
declarations contain at leastborder: initial
. This allows us to write a rule like this:This works unless the user wants to set a value of
initial
forborder
in--foo
. In this case the value is incorrect. In the native case, the computed value isinitial
and in the shim'd case it is the fallback.See: http://jsbin.com/veqebo/edit?html,output.
The text was updated successfully, but these errors were encountered: