Skip to content

Incorrect pseudo-selector output #125

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

Open
siilike opened this issue May 22, 2020 · 2 comments · May be fixed by #126
Open

Incorrect pseudo-selector output #125

siilike opened this issue May 22, 2020 · 2 comments · May be fixed by #126
Labels

Comments

@siilike
Copy link

siilike commented May 22, 2020

Input:

:root
{
	--XXX: 15px;
}

#test li
{
	font-size: var(--XXX);
}

#test:not(.class)
{
	--XXX: 8px;
}

#test2 li
{
	font-size: var(--XXX);
}

#test2:hover
{
	--XXX: 8px;
}

Expected:

#test li
{
	font-size: 15px;
}

#test:not(.class) li
{
	font-size: 8px;
}

#test2 li
{
	font-size: 15px;
}

#test2:hover li
{
	font-size: 8px;
}

Actual:

#test li
{
	font-size: 15px;
}

#test li:not(.class)
{
	font-size: 8px;
}

#test2 li
{
	font-size: 15px;
}

#test2 li:hover
{
	font-size: 8px;
}
@siilike siilike linked a pull request May 23, 2020 that will close this issue
@DevT0ny
Copy link

DevT0ny commented May 6, 2021

same applies for pseduo-class
input :

.classname:focus{
  --bg-opacity: 1;
  background-color: rgba(183, 148, 244, var(--bg-opacity));
}

output:

.classname:focus{
  background-color: undefined;
}
.classname:focus:focus {
  background-color: rgba(183, 148, 244, 1);
}

expected :

.classname:focus {
  background-color: rgba(183, 148, 244, 1);
}

@vithar
Copy link

vithar commented Dec 1, 2021

I have the same problem in 0.18.0 version.

Input:

.a::before {
    --color-l-text: red;

    color: var(--color-l-text);
}

Output:

.a::before {
    --color-l-text: red;

    color: undefined;

    color: var(--color-l-text);
}
.a::before::before {

    color: red;

    color: var(--color-l-text);
}

Expected

.a::before {
    --color-l-text: red;

    color: red;

    color: var(--color-l-text);
}

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

Successfully merging a pull request may close this issue.

4 participants