Why this fires¶
:global(…) is the scoped sheet's escape hatch: the wrapped compound is emitted without the component stamp. Two shapes make no sense and are rejected:
- Empty —
:global() { … }wraps nothing; there is no compound to exempt. - Nested —
:global(:global(a))escapes an escape; the inner wrapper can only be a mistake.
fn Card() -> View {
<div class="card">
<style>:global() { margin: 0 }</style>
</div>
}
// error[TE734]: malformed `:global()` — empty or nestedFix it¶
Put exactly one selector (or compound chain) inside the wrapper:
<style>:global(body) { margin: 0 }
:global(.theme-dark) .card { background: black }</style>If the whole block is global anyway, drop the wrappers and mark the tag instead: <style global>…</style>.
Inside a <style global> body :global(…) is not Zolo syntax at all — it passes through to the browser untouched, so this error only ever fires in scoped sheets.