@loidolt/theme-styles 0.8.1 → 0.9.1

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/README.md CHANGED
@@ -15,6 +15,15 @@ Deep entry points include `/tokens`, `/base`, `/components`, `/utilities`, `/acc
15
15
  `/fonts`, `/dark`, and `/dark-auto`. Every slice except `/tokens` expects the token custom
16
16
  properties to be loaded first.
17
17
 
18
+ `/core` is the whole stylesheet without the styles for media, charts, maps, long-form prose and
19
+ docs, for an app that uses only the Svelte components. Add an extra back through
20
+ `/components/*`, inside the components layer:
21
+
22
+ ```css
23
+ @import '@loidolt/theme-styles/core';
24
+ @import '@loidolt/theme-styles/components/prose' layer(loidolt.components);
25
+ ```
26
+
18
27
  Built-in style presets live under `/presets/*`: `loidolt`, `soft` and `compact`, each with
19
28
  `-dark` and `-dark-auto` companions. They apply under `data-preset="<name>"`.
20
29
 
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@loidolt/theme-styles",
3
- "version": "0.8.1",
3
+ "version": "0.9.1",
4
4
  "description": "Base styles, fonts, accessibility helpers, and utilities for Loidolt applications",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "style": "./src/index.css",
8
8
  "exports": {
9
9
  ".": "./src/index.css",
10
+ "./core": "./src/core.css",
10
11
  "./tokens": "./src/tokens.css",
11
12
  "./dark": "./src/dark.css",
12
13
  "./dark-auto": "./src/dark-auto.css",
@@ -15,6 +16,7 @@
15
16
  "./accessibility": "./src/accessibility.css",
16
17
  "./utilities": "./src/utilities.css",
17
18
  "./components": "./src/components.css",
19
+ "./components/*": "./src/components/*.css",
18
20
  "./fonts": "./src/fonts.css",
19
21
  "./fonts/*": "./src/fonts/*",
20
22
  "./package.json": "./package.json"
@@ -29,7 +31,7 @@
29
31
  "build": "node -e \"console.log('theme-styles: source CSS is publish-ready')\""
30
32
  },
31
33
  "dependencies": {
32
- "@loidolt/theme-tokens": "^0.8.1"
34
+ "@loidolt/theme-tokens": "^0.9.1"
33
35
  },
34
36
  "publishConfig": {
35
37
  "access": "public",
package/src/core.css ADDED
@@ -0,0 +1,42 @@
1
+ /*
2
+ * Layer order is declared up front so consumers can slot their own layers between ours.
3
+ *
4
+ * `loidolt.reset` is intentionally empty and reserved: the reset lives in `base.css` behind
5
+ * `:where()` (zero specificity), and this slot lets an app opt into its own reset ahead of
6
+ * our base styles without reordering the rest.
7
+ *
8
+ * `loidolt.a11y` is last so the focus ring and the reduced-motion overrides beat component
9
+ * styles by layer order alone — no `!important` needed, which keeps app CSS able to override
10
+ * them (unlayered styles outrank every layer for normal declarations).
11
+ *
12
+ * `loidolt.vendor` holds third-party stylesheets a loidolt package ships with — MapLibre's, for
13
+ * `@loidolt/theme-maps`. Vendor CSS left unlayered would outrank every layer here; slotted after
14
+ * `base` and before `components`, our resets cannot break it and our component styles can
15
+ * restyle it, whichever order the two stylesheets are imported in.
16
+ */
17
+ @layer loidolt.tokens, loidolt.reset, loidolt.base, loidolt.vendor, loidolt.components,
18
+ loidolt.utilities, loidolt.a11y;
19
+
20
+ /*
21
+ * `core.css` is the stylesheet for the Svelte components and app layout, without the extras a
22
+ * page may not use: media players and galleries, charts, maps, long-form prose and docs. Add any
23
+ * of those back one at a time through `components/*`, inside the components layer:
24
+ *
25
+ * @import '@loidolt/theme-styles/core';
26
+ * @import '@loidolt/theme-styles/components/prose' layer(loidolt.components);
27
+ *
28
+ * `index.css` is exactly this plus every extra.
29
+ */
30
+ @import '@loidolt/theme-tokens/css' layer(loidolt.tokens);
31
+ @import './fonts.css' layer(loidolt.base);
32
+ @import './base.css' layer(loidolt.base);
33
+ @import './components/actions.css' layer(loidolt.components);
34
+ @import './components/forms.css' layer(loidolt.components);
35
+ @import './components/surfaces.css' layer(loidolt.components);
36
+ @import './components/data.css' layer(loidolt.components);
37
+ @import './components/feedback.css' layer(loidolt.components);
38
+ @import './components/overlays.css' layer(loidolt.components);
39
+ @import './components/selection.css' layer(loidolt.components);
40
+ @import './components/layout.css' layer(loidolt.components);
41
+ @import './utilities.css' layer(loidolt.utilities);
42
+ @import './accessibility.css' layer(loidolt.a11y);
package/src/index.css CHANGED
@@ -1,25 +1,11 @@
1
1
  /*
2
- * Layer order is declared up front so consumers can slot their own layers between ours.
3
- *
4
- * `loidolt.reset` is intentionally empty and reserved: the reset lives in `base.css` behind
5
- * `:where()` (zero specificity), and this slot lets an app opt into its own reset ahead of
6
- * our base styles without reordering the rest.
7
- *
8
- * `loidolt.a11y` is last so the focus ring and the reduced-motion overrides beat component
9
- * styles by layer order alone — no `!important` needed, which keeps app CSS able to override
10
- * them (unlayered styles outrank every layer for normal declarations).
11
- *
12
- * `loidolt.vendor` holds third-party stylesheets a loidolt package ships with — MapLibre's, for
13
- * `@loidolt/theme-maps`. Vendor CSS left unlayered would outrank every layer here; slotted after
14
- * `base` and before `components`, our resets cannot break it and our component styles can
15
- * restyle it, whichever order the two stylesheets are imported in.
2
+ * The whole stylesheet: `core.css` (layer order, tokens, base, the component and layout styles,
3
+ * utilities and accessibility) plus the extras for media, charts, maps, prose and docs. Pages
4
+ * that need none of the extras can import `@loidolt/theme-styles/core` instead.
16
5
  */
17
- @layer loidolt.tokens, loidolt.reset, loidolt.base, loidolt.vendor, loidolt.components,
18
- loidolt.utilities, loidolt.a11y;
19
-
20
- @import '@loidolt/theme-tokens/css' layer(loidolt.tokens);
21
- @import './fonts.css' layer(loidolt.base);
22
- @import './base.css' layer(loidolt.base);
23
- @import './components.css' layer(loidolt.components);
24
- @import './utilities.css' layer(loidolt.utilities);
25
- @import './accessibility.css' layer(loidolt.a11y);
6
+ @import './core.css';
7
+ @import './components/media.css' layer(loidolt.components);
8
+ @import './components/charts.css' layer(loidolt.components);
9
+ @import './components/maps.css' layer(loidolt.components);
10
+ @import './components/prose.css' layer(loidolt.components);
11
+ @import './components/docs.css' layer(loidolt.components);