@loidolt/theme-styles 0.8.0 → 0.9.0
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 +9 -0
- package/package.json +4 -2
- package/src/components/overlays.css +11 -2
- package/src/core.css +42 -0
- package/src/index.css +9 -23
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.
|
|
3
|
+
"version": "0.9.0",
|
|
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.
|
|
34
|
+
"@loidolt/theme-tokens": "^0.9.0"
|
|
33
35
|
},
|
|
34
36
|
"publishConfig": {
|
|
35
37
|
"access": "public",
|
|
@@ -9,7 +9,11 @@
|
|
|
9
9
|
z-index: var(--loidolt-z-dialog);
|
|
10
10
|
top: 50%;
|
|
11
11
|
left: 50%;
|
|
12
|
-
|
|
12
|
+
/* A column whose body alone shrinks and scrolls, so the header and the footer's actions stay in
|
|
13
|
+
view however tall the content (or short the screen). Flex rather than grid rows, because an
|
|
14
|
+
AlertDialog without content has no body. */
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
13
17
|
width: min(var(--ldt-dialog-width, 34rem), calc(100vw - 2rem));
|
|
14
18
|
max-height: min(48rem, calc(100dvh - 2rem));
|
|
15
19
|
overflow: hidden;
|
|
@@ -36,7 +40,6 @@
|
|
|
36
40
|
--ldt-dialog-width: 100vw;
|
|
37
41
|
height: calc(100dvh - 2rem);
|
|
38
42
|
max-height: none;
|
|
39
|
-
grid-template-rows: auto minmax(0, 1fr) auto;
|
|
40
43
|
}
|
|
41
44
|
.ldt-dialog__actions {
|
|
42
45
|
display: flex;
|
|
@@ -49,6 +52,10 @@
|
|
|
49
52
|
.ldt-dialog__footer {
|
|
50
53
|
padding: var(--loidolt-pad-overlay);
|
|
51
54
|
}
|
|
55
|
+
.ldt-dialog__header,
|
|
56
|
+
.ldt-dialog__footer {
|
|
57
|
+
flex: none;
|
|
58
|
+
}
|
|
52
59
|
.ldt-dialog__header {
|
|
53
60
|
display: flex;
|
|
54
61
|
align-items: start;
|
|
@@ -61,6 +68,8 @@
|
|
|
61
68
|
min-width: 0;
|
|
62
69
|
}
|
|
63
70
|
.ldt-dialog__body {
|
|
71
|
+
flex: 1 1 auto;
|
|
72
|
+
min-height: 0;
|
|
64
73
|
overflow-y: auto;
|
|
65
74
|
}
|
|
66
75
|
.ldt-dialog__footer {
|
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
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
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
|
-
@
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@import '
|
|
21
|
-
@import './
|
|
22
|
-
@import './
|
|
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);
|