Skip to content

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

@pfrankov

Description

@pfrankov

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions