Many developers are starting using <teleport> in their components. For example dropdown component in primeVue, use teleport for select options, with sending them to end of the body.
This although brings big problem/question for CSS targeting, where I can not use parent classes to target here is direct example :
<div class="red-container">
<Dropdown v-model="dropSelect" :options="yesNo" optionLabel="name" optionValue="code" />
</div>
with style
.red-container .option-item{
color : red
}
This css will fail of simple reason that options html is not inside ".red-container" but at the end of the body since component authors decide to use <teleport> for it, so it seems impossible to style it depending on parent class.
I encounter this behavior in several components while doing maintenance updates of versions, breaking all my themes, trouble is I do not know how to fix this?
How do You target teleported content CSS with parent class, is it even possible ?