You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
If styles are defined as nested parent > child selectors, they do net get applied to the child element inside the snippet.
Workaround:
Use :global() selector or directly target the element.
Expected Behaviour:
The behaviour is consistent to how one previously had to style nested components.
However as the snippet code lives in the same document, the behaviour now seems unintuitive.
{#snippetmy_snippet()}
<span> Hello world </span>
{/snippet}
<div>{@rendermy_snippet()}</div>
<style>
div>span, divspan {background-color: red;/* this doesn't work */ }div> :global(span) {letter-spacing: 10px;/* this works */ }span {text-decoration: underline;/* this works */ }
</style>
Describe the bug
Problem:
If styles are defined as nested parent > child selectors, they do net get applied to the child element inside the snippet.
Workaround:
Use :global() selector or directly target the element.
Expected Behaviour:
The behaviour is consistent to how one previously had to style nested components.
However as the snippet code lives in the same document, the behaviour now seems unintuitive.
Reproduction
REPL to reproduce
Logs
No response
System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: