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

Not applying effect in components #40

Open
decomoraes opened this issue Apr 8, 2021 · 2 comments
Open

Not applying effect in components #40

decomoraes opened this issue Apr 8, 2021 · 2 comments

Comments

@decomoraes
Copy link

decomoraes commented Apr 8, 2021

Has some way to apply effect in my external components imported in a file with scope?

example:

import 'style.scoped.sass'
import Component from 'component'

export default function foo() {
  return (
    <Component className="class_from_style_scoped" />
  )
}

Thanks :)

@gaoxiaoliangz
Copy link
Owner

There are two ways to achieve this:

  1. use the /deep/ selector
  2. If you can control the impl of Component, let it pass down the data-v-{hash} prop, then the scoped style will take effect

@infantito
Copy link

infantito commented Jun 22, 2021

@gaoxiaoliangz
is there any way to skip hash?

I have something like this and I don't want it to be hashed

.parent .child {
....
}

My case is I concatenate two values => className=parent parent--${customClassname}

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

No branches or pull requests

3 participants