Skip to content
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

Forbid empty custom properties #2655

Closed
nex3 opened this issue May 31, 2018 · 3 comments · Fixed by #2882
Closed

Forbid empty custom properties #2655

nex3 opened this issue May 31, 2018 · 3 comments · Fixed by #2882

Comments

@nex3
Copy link
Contributor

nex3 commented May 31, 2018

LibSass currently ignores custom properties without values, such as --foo:; and --foo:#{""};. Since CSS considers these invalid, LibSass should error out for them rather than ignoring them.

See sass/sass-spec#1249 and sass/sass-spec#1259

@nschonni
Copy link
Collaborator

nschonni commented Jun 1, 2018

What should the behaviour be if the interpolation leads to a empty set? I saw the #{""} example, but i'm thinking about #{"$variable-evaluating-to-null"}.

@nex3
Copy link
Contributor Author

nex3 commented Jun 1, 2018

I'm not sure what you mean by "an empty set", but any interpolation that would cause the value of the custom property to be empty should be an error.

@nschonni
Copy link
Collaborator

nschonni commented Jun 2, 2018

Sorry, I just meant the case when the selector evaluates to a null CSS selector like --foo:;. I didn't see the test cases covering that, and was being super literal 😦 .

glebm added a commit to sass/sass-spec that referenced this issue Apr 19, 2019
glebm added a commit to glebm/libsass that referenced this issue Apr 19, 2019
glebm added a commit that referenced this issue Apr 20, 2019
glebm added a commit to sass/sass-spec that referenced this issue Apr 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants