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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(cli): CSS preprocessor for scoped #12860

Merged
merged 1 commit into from May 18, 2024
Merged

fix(cli): CSS preprocessor for scoped #12860

merged 1 commit into from May 18, 2024

Conversation

zoy-l
Copy link
Contributor

@zoy-l zoy-l commented May 13, 2024

There's a hole here 馃ゲ, if you don't set preprocessLang compileStyle to css by default, scopedId will be added for each class name

// raw set scoped
.hello{
  &-title{
     color:red;
  }
}
// expect
.hello-title[data-v-7578cda5] {
  color: red;
}
// preprocessLang is not set
.hello[data-v-7578cda5] {
  &-title[data-v-7578cda5] {
    color: red;
  }
}
// to
.hello[data-v-7578cda5]-title[data-v-7578cda5] {
  color: red;
}

But it's the equivalent of going through two CSS preprocessor compilations

fix #12844

@chenjiahan chenjiahan changed the title fix(cli): CSS preprocessor fix(cli): CSS preprocessor for scoped May 18, 2024
@chenjiahan
Copy link
Member

Thanks! 鉂わ笍

@chenjiahan chenjiahan merged commit 413150a into youzan:main May 18, 2024
10 checks passed
@chenjiahan
Copy link
Member

Released: @vant/cli v7.0.3

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

Successfully merging this pull request may close these issues.

vant/cli css 鎵撳寘bug Selector "[data-v-5c89f644]" can't have a suffix
2 participants