tutuca 0.9.92 → 0.9.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tutuca",
3
- "version": "0.9.92",
3
+ "version": "0.9.93",
4
4
  "type": "module",
5
5
  "description": "Zero-dependency SPA framework with immutable state and virtual DOM",
6
6
  "main": "./dist/tutuca.js",
@@ -828,6 +828,23 @@ component({
828
828
  Tagged templates `html` and `css` are just `String.raw` (editor hinting
829
829
  only). Plain strings work too.
830
830
 
831
+ `style` and `commonStyle` are wrapped in a component-scoped selector
832
+ (`[data-cid="N"]{ … }`), so their CSS lands *inside* a style-rule block.
833
+ Top-level-only constructs break there and the browser silently drops them —
834
+ put them in `globalStyle` (injected verbatim, no wrapper) instead:
835
+
836
+ - Non-nestable at-rules: `@import`, `@charset`, `@namespace`, `@font-face`,
837
+ `@keyframes`, `@page`, `@property`, `@counter-style`, `@font-feature-values`,
838
+ `@font-palette-values`, `@view-transition`. (Conditional group rules —
839
+ `@media`, `@supports`, `@container`, `@layer`, `@scope`, `@starting-style` —
840
+ *do* nest and stay in `style`/`commonStyle`.)
841
+ - Rules whose leading selector is `html`, `body`, or `:root`: once scoped they
842
+ become descendant selectors that never match.
843
+
844
+ The linter flags both (`TOP_LEVEL_AT_RULE_IN_SCOPED_STYLE`,
845
+ `GLOBAL_SELECTOR_IN_SCOPED_STYLE`). For a genuine false positive, put a
846
+ `/* tutuca-lint-ignore */` comment on the same line as the flagged construct.
847
+
831
848
  For Tailwind / MargaUI utility classes (compiling `class=` literals into
832
849
  CSS via the extra build), see [margaui.md](./margaui.md).
833
850