@nextsparkjs/theme-blog 0.1.0-beta.185 → 0.1.0-beta.186

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/styles/globals.css +14 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextsparkjs/theme-blog",
3
- "version": "0.1.0-beta.185",
3
+ "version": "0.1.0-beta.186",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./config/theme.config.ts",
@@ -27,7 +27,20 @@
27
27
  @custom-variant dark (&:where(.dark, .dark *));
28
28
 
29
29
  @plugin "@tailwindcss/container-queries";
30
- @import "@nextsparkjs/core/styles/ui.css";
30
+ /* @nextsparkjs/core/styles/ui.css is intentionally NOT imported here: it is
31
+ pre-compiled by packages/core/scripts/build/build-ui-css.mjs with a plain
32
+ `@import "tailwindcss"` that has no knowledge of this theme's
33
+ `@custom-variant dark` override above, so it bakes every dark: utility it
34
+ contains (including ThemeToggle's own dark:-rotate-90/scale-0 icon
35
+ classes) using Tailwind's default `@media (prefers-color-scheme: dark)`
36
+ strategy. Importing that already-compiled CSS re-declares the same
37
+ classes with that conflicting strategy, so they stop following
38
+ next-themes' `.dark`/`.light` class and instead silently track the
39
+ visitor's OS/browser color-scheme preference (issue #110). The @source
40
+ globs below already scan core's source (monorepo) and its compiled dist
41
+ output (npm) directly into THIS compilation, so they pick up the same
42
+ classes correctly scoped to `@custom-variant dark` — the separate ui.css
43
+ import is redundant. */
31
44
  @import "@nextsparkjs/core/styles/utilities.css";
32
45
  @import "@nextsparkjs/core/styles/docs.css";
33
46
  @source "../../../**/*.{js,ts,jsx,tsx}";