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

[Bug]: When variable is used with space after/before brackets their definition is not preserved. #1264

Open
1 task done
pszczesniak opened this issue Jul 18, 2024 · 0 comments
Labels

Comments

@pszczesniak
Copy link

Describe the bug

When there is a declared variable:

:root {
	--foo: red;
}

and is used with some class, for example:

.bar {
	color: var( --foo );
}

In the result the variable declaration is omitted.

All works fine when

.bar {
	color: var(--foo);
}

I know that this is the most common case of how CSS vars are written in CSS code, but the specification does not prohibit the use of spaces.

To Reproduce

Demo on StackBlitz: https://stackblitz.com/edit/stackblitz-starters-g6qdqe?file=index.js,output.css,input.css

Expected Behavior

Used variable is preserved.

Environment

Version: 6.0.0

Add any other context about the problem here

context

Code of Conduct

  • I agree to follow this project's Code of Conduct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant