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

docs: write about the deep selector on README #60

Merged

Conversation

Avantgarde95
Copy link
Contributor

  • About /deep/
  • About the alternative method

@Avantgarde95 Avantgarde95 force-pushed the write-about-deep-selector branch from 8220661 to 18d054a Compare March 26, 2022 15:35
@Avantgarde95 Avantgarde95 changed the title [docs] Write about the deep selector on README docs: Write about the deep selector on README Mar 26, 2022
* About `/deep/`
* About the alternative method
@Avantgarde95 Avantgarde95 force-pushed the write-about-deep-selector branch from 18d054a to 5d70816 Compare March 26, 2022 15:35
@Avantgarde95 Avantgarde95 changed the title docs: Write about the deep selector on README docs: write about the deep selector on README Mar 26, 2022
@gaoxiaoliangz gaoxiaoliangz merged commit 5ffb04b into gaoxiaoliangz:master Aug 11, 2023
This was referenced Aug 11, 2023
@Heliodromel
Copy link

Hi,
I have a question about the alternative method : it seems to be an alternative only when using Vue. Are you aware of something similar when using this project with reactjs ?

Thanks,

@Avantgarde95
Copy link
Contributor Author

Hi, I have a question about the alternative method : it seems to be an alternative only when using Vue. Are you aware of something similar when using this project with reactjs ?

Thanks,

It might work with React, too. I used that method in the React-based project. (I think that @vue/component-compiler-utils is used internally and it doesn't make any problems with React.)

@Heliodromel
Copy link

Oh ok, i see and do you have any clue how to load @vue/component-compiler-utils in a react project. Does it mean i should add "vue-loader" to my webpack config ?

@Heliodromel
Copy link

Actually, looking at the code (packages/scoped-css-loader/index.js) i can see that @vue/component-compiler-utils is already used by this plugin to deal with the scoped style so i guess the ::v-deep directive should work out of the box, even in my react project.

However, the sass-loader runs first when dealing with my *.scoped.scss files and sass is telling that it does not recognize ::v-deep pseudo element.

How does it work for you in Vue project ? Do you have another loader which runs before sass-loader which rewrites/replace somehow ::v-deep pseudo element with something else ?

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

Successfully merging this pull request may close these issues.

4 participants