maoberlehner / transition-to-height-auto-with-vue

This is an example project for the following article: https://markus.oberlehner.net/blog/transition-to-height-auto-with-vue/
105 stars 37 forks source link

style scoped #5

Closed 719media closed 5 years ago

719media commented 5 years ago

https://github.com/maoberlehner/transition-to-height-auto-with-vue/blob/master/src/components/TransitionExpand.vue#L68-L75

I'm not sure this styling does anything? The style is scoped, and yet this component will not have any nodes in DOM, so this will never apply to anything?

maoberlehner commented 5 years ago

Yes.

However, a child component's root node will be affected by both the parent's scoped CSS and the child's scoped CSS.

https://vue-loader.vuejs.org/guide/scoped-css.html#child-component-root-elements