Documentation Index
Fetch the complete documentation index at: https://mintlify.com/davesnx/styled-ppx/llms.txt
Use this file to discover all available pages before exploring further.
%styled.global / [%styled.global] injects styles directly into the document without generating or attaching any scoped class name. Unlike %cx and %styled.*, which scope their rules to a generated class, the rules you write inside %styled.global are applied exactly as written — making it the right tool for resets, base typography, and document-level selectors.
Basic usage
The CSS string is parsed in stylesheet mode: top-level selectors stay as written, just as they would in a.css file.
Differences from %cx and %styled.*
| Feature | %styled.global | %cx / %styled.* |
|---|---|---|
| Scoped to a generated class | No — global | Yes |
| Accepts top-level selectors | Yes | No (needs & nesting) |
| Returns a class name | No | Yes |
| Good for resets / base styles | ✅ | ❌ |
@font-face warning
Similarly, avoid @import inside %styled.global for the same reason — the network request for the imported resource will not start until the emotion runtime runs.