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

Unicode variable names in v-bind of Style will be convert to _ #6803

Closed
AuroraTea opened this issue Oct 1, 2022 · 1 comment · Fixed by #6816
Closed

Unicode variable names in v-bind of Style will be convert to _ #6803

AuroraTea opened this issue Oct 1, 2022 · 1 comment · Fixed by #6816
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. 🐞 bug Something isn't working scope: sfc-style-vars

Comments

@AuroraTea
Copy link

AuroraTea commented Oct 1, 2022

Vue version

3.2.40

Link to minimal reproduction

https://sfc.vuejs.org/#eNptkU1OhEAQha9S6Q0zicAeGRPv0Rt+mpme0D/pajATwgI3HkDjFVwY9yYuPQrGc9gNaMYJu6r6HvR7eR251TpqG0YSkmJhuLaAzDb6hkoutDIWOjCsgh4qowQEThpQSWWhJFpgcl9zPMDOazaBYWWw/WVf72/fzw+raBxex+FjvH8ch6dVQWUy+fmScbygaTx7dO7cYpnQdWaZ32xa8haKOkPcUZJRErsrwL9rPl/T+PxDmaI91X4EyFV56vwAUKhamQTaMOey3Cw5t9drcA66zs6Triv+os64n0JOjsgVmSsIRaajIyrpSprs0QUgJQkshilx1fidkoO1GpM4xqrw1R4xUmYfuykyjbRcsIihCHOj7pAZ92NKlpd70v8AnvrAUQ==

Steps to reproduce

1, Declare responsive variables in script with Unicode variable names.'
2, Use in style via v-bind.

What is expected?

JS and CSS variable names both support Unicode variable names, so there is no problem compiling directly into Unicode CSS variable names?

    var(--472cff63-english);
    var(--472cff63-中文);
    var(--472cff63-にほんご);
    var(--472cff63-français);

What is actually happening?

Unicode JS variable names used in Style via v-bind() will be replaced with _ when compiled into CSS code. Then variable names with the same number of digits will be converted to the same.

    var(--472cff63-english);
    var(--472cff63-__);
    var(--472cff63-____);
    var(--472cff63-fran_ais);

System Info

No response

Any additional comments?

No response

@sxzz
Copy link
Member

sxzz commented Oct 3, 2022

It will only affect dev mode, and be hashed, like var(--50d5a8e9), in production mode.

@posva posva added 🐞 bug Something isn't working 🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. scope: sfc-style-vars labels Oct 6, 2022
yyx990803 pushed a commit that referenced this issue Nov 9, 2022
chrislone pushed a commit to chrislone/core that referenced this issue Feb 4, 2023
zhangzhonghe pushed a commit to zhangzhonghe/core that referenced this issue Apr 12, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🍰 p2-nice-to-have Priority 2: this is not breaking anything but nice to have it addressed. 🐞 bug Something isn't working scope: sfc-style-vars
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants