Skip to content

Inherited calculation not using correctly scoped variable #41

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
urrri opened this issue Jul 15, 2016 · 0 comments · May be fixed by #126
Open

Inherited calculation not using correctly scoped variable #41

urrri opened this issue Jul 15, 2016 · 0 comments · May be fixed by #126
Labels

Comments

@urrri
Copy link

urrri commented Jul 15, 2016

I enter following:

:root {
    --aaa: 2;
    --bbb: calc(var(--aaa) * 2);
}

.btn {
    --aaa: 3;
    width: var(--aaa);
    height: var(--bbb);
}

.btn:hover {
    --aaa: 4;
}

and receive:

.btn {
    width: 3;
    height: calc(4 * 2); /*here is the error, it should be 3*2*/
}

.btn:hover {
    height: calc(4 * 2);
}

.btn:hover {
    width: 4;
}
@MadLittleMods MadLittleMods changed the title incorrect inherited calculation (checked in playground) Inherited calculation not using correctly scoped variable Jul 18, 2016
@siilike siilike linked a pull request May 23, 2020 that will close this issue
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.

2 participants