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
transformPug:false, // Disable pug if not using it
36
-
cache:'teamplay'//Force teamplay caching
36
+
cache:'teamplay'//Legacy compatibility alias
37
37
}]
38
38
]
39
39
}
@@ -61,7 +61,9 @@ You can also set platform-specific variables in your Stylus code:
61
61
62
62
## Caching
63
63
64
-
When `cache: 'teamplay'` is set (or auto-detected), the Babel transform generates code that integrates with [teamplay](https://github.com/startupjs/teamplay) for optimized style memoization.
64
+
CSSX uses the built-in resolver cache by default. The old `cache: 'teamplay'`
65
+
option is still accepted so existing configs do not break, but CSSX no longer
66
+
imports Teamplay and components do not need `observer()`.
65
67
66
68
See the [Caching guide](/guide/caching) for more details.
67
69
@@ -103,6 +105,7 @@ The Babel preset converts this into optimized runtime code that:
103
105
- Compiles Stylus to style objects at build time
104
106
- Connects `styleName` to the compiled styles
105
107
- Injects part style props automatically
108
+
- Re-renders only when used CSS variables or matching media queries change
|`&.modifier`| Modifier class (used within parent) |
218
240
|`:part(name)`| Part selector |
241
+
|`:hover`| Emits `hoverStyle`, same as `:part(hover)`|
242
+
|`:active`| Emits `activeStyle`, same as `:part(active)`|
219
243
220
244
> **Note:** Descendant selectors (`.parent .child`) are not supported. Apply modifiers directly to each element that needs styling.
221
245
222
-
> **Note:**Pseudo-classes (`:hover`, `:focus`, `:active`, etc.) and pseudo-elements (`::before`, `::after`) are not supported. Use state-based modifiers instead (e.g., `&.focused`, `&.active`).
246
+
> **Note:**`:focus`, other pseudo-classes, and pseudo-elements (`::before`, `::after`) are not supported. Use state-based modifiers for those cases.
223
247
224
248
### Part Selector
225
249
@@ -248,9 +272,9 @@ When the same property is defined in multiple places (highest to lowest):
248
272
249
273
## Limitations
250
274
251
-
-No expression interpolations: ``styl`color ${color}` `` is not allowed
252
-
-Must be a plain template literal
253
-
- For dynamic values, use CSS variables or the `style` prop
275
+
-JavaScript interpolation is local-only: module-level `styl` templates must be plain template literals
276
+
-Interpolation is value-only, not selector or property-name interpolation
277
+
- For runtime-generated plain CSS strings, use `useCompiledCss()` with the `css` runtime API
0 commit comments