Answer the question
In order to leave comments, you need to log in
How to apply styles from parent component to class passed to slot?
Let's say there is a component that has a slot.
<template lang="pug">
.my-component
// some component data
slot(name="hello")
</template>
<style lang="sass" scoped>
.hello
// some styles
</style>
<template lang="pug">
.another-component
MyComponent
template(#hello)
.hello Blah blah blah
</template>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question