LoginSignup
1
0

More than 3 years have passed since last update.

vueのstyleの上書き(親コンポーネントから子コンポーネントに対してオーバーライド)

Last updated at Posted at 2020-12-08

子コンポーネントに対してのstyleの上書き

ディープセレクタ>>>で繋ぐ。

<style scoped>
.親コンポーネントクラス >>> .子コンポーネントクラス {
  background-color: #fff000 !important
}
</style>

情報元こちらです🙏
https://blog.piyo.tech/posts/2018-10-23-vuejs-override-child-component-style/
https://vue-loader-v14.vuejs.org/ja/features/scoped-css.html

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0