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

A problem with renaming CSS variables #137

Closed
da-yauhenzadziarkouski opened this issue Jul 13, 2021 · 1 comment
Closed

A problem with renaming CSS variables #137

da-yauhenzadziarkouski opened this issue Jul 13, 2021 · 1 comment
Labels

Comments

@da-yauhenzadziarkouski
Copy link

da-yauhenzadziarkouski commented Jul 13, 2021

I've experienced an odd problem with renaming of CSS Variables. It works fine except when already declared variable had been overwritten in the scope: the last variable in the last CSS property value wasn't replaced for some reason.

CSS:

*, ::before, ::after {
    --tw-shadow: 0 0 transparent;
    --tw-ring-offset-shadow: 0 0 transparent;
    --tw-ring-shadow: 0 0 transparent;
}
.shadow-small {
    --tw-shadow: 0 2px 4px 0 rgb(151, 145, 151, 0.1);
    box-shadow: 0 0 transparent,0 0 transparent,var(--tw-shadow);
    box-shadow: var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent), var(--tw-shadow);
}

Expected result:

*, ::before, ::after {
    --f: 0 0 transparent;
    --d: 0 0 transparent;
    --v: 0 0 transparent;
}
.a {
    --f: 0 2px 4px 0 rgb(151,145,151,0.1);
    box-shadow: 0 0 transparent,0 0 transparent,var(--f);
    box-shadow: var(--d,0 0 transparent),var(--v,0 0 transparent),var(--f);
}

Actual result:

*, ::before, ::after {
    --f: 0 0 transparent;
    --d: 0 0 transparent;
    --v: 0 0 transparent;
}
.a {
    --f: 0 2px 4px 0 rgb(151,145,151,0.1);
    box-shadow: 0 0 transparent,0 0 transparent,var(--f);
    box-shadow: var(--d,0 0 transparent),var(--v,0 0 transparent),var(--tw-shadow);
}
@JPeer264
Copy link
Owner

@da-yauhenzadziarkouski fixed in v3.6.5. Thanks writing such a detailed issue, this really helped me to find the issue 👍

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

2 participants