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

Too many empty :root in output when passing variables #119

Open
pfrankov opened this issue Apr 9, 2020 · 1 comment
Open

Too many empty :root in output when passing variables #119

pfrankov opened this issue Apr 9, 2020 · 1 comment

Comments

@pfrankov
Copy link

pfrankov commented Apr 9, 2020

Here is an issue:
There is a test fixture called test/fixtures/js-defined-preserve-injected.css

.box1 {
	width: var(--js-defined1);
	height: var(--js-defined2);
	background: var(--js-defined-no-prefix);
}

With an output in test/fixtures/js-defined-preserve-injected.expected.css

:root {
}
:root {
}
:root {
}
:root {
}

.box1 {
	width: 75px;
	width: var(--js-defined1);
	height: 80px;
	height: var(--js-defined2);
	background: #ff0000;
	background: var(--js-defined-no-prefix);
}

I'd say that these duplicating :roots are not very useful for any purpose and must be removed from the output.

What do you think?

@MadLittleMods
Copy link
Owner

Related to #89

It would be nice if they were not in the output. PR welcome to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants