@loidolt/theme-styles 0.2.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/LICENSE +21 -0
- package/package.json +44 -0
- package/src/accessibility.css +73 -0
- package/src/base.css +52 -0
- package/src/components.css +891 -0
- package/src/dark-auto.css +5 -0
- package/src/dark.css +10 -0
- package/src/fonts/Archivo-LICENSE.txt +93 -0
- package/src/fonts/Archivo-Regular.woff2 +0 -0
- package/src/fonts/Jost-LICENSE.txt +93 -0
- package/src/fonts/Jost-Medium.woff2 +0 -0
- package/src/fonts.css +23 -0
- package/src/index.css +20 -0
- package/src/tokens.css +2 -0
- package/src/utilities.css +61 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Chris Loidolt
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@loidolt/theme-styles",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Base styles, fonts, accessibility helpers, and utilities for Loidolt applications",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"style": "./src/index.css",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./src/index.css",
|
|
10
|
+
"./tokens": "./src/tokens.css",
|
|
11
|
+
"./dark": "./src/dark.css",
|
|
12
|
+
"./dark-auto": "./src/dark-auto.css",
|
|
13
|
+
"./base": "./src/base.css",
|
|
14
|
+
"./accessibility": "./src/accessibility.css",
|
|
15
|
+
"./utilities": "./src/utilities.css",
|
|
16
|
+
"./components": "./src/components.css",
|
|
17
|
+
"./fonts/*": "./src/fonts/*",
|
|
18
|
+
"./package.json": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"src"
|
|
22
|
+
],
|
|
23
|
+
"sideEffects": [
|
|
24
|
+
"**/*.css"
|
|
25
|
+
],
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=22"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "node -e \"console.log('theme-styles: source CSS is publish-ready')\""
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@loidolt/theme-tokens": "^0.2.0"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public",
|
|
37
|
+
"provenance": true
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "git+https://github.com/loidolt/loidolt-theme.git",
|
|
42
|
+
"directory": "packages/styles"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* Deep slice: assumes the token custom properties are already loaded.
|
|
2
|
+
Import '@loidolt/theme-styles/tokens' (or the whole '@loidolt/theme-styles') first. */
|
|
3
|
+
:where(:focus-visible) {
|
|
4
|
+
outline: 2px solid var(--loidolt-focus-ring);
|
|
5
|
+
outline-offset: 2px;
|
|
6
|
+
}
|
|
7
|
+
:where(:focus:not(:focus-visible)) {
|
|
8
|
+
outline: none;
|
|
9
|
+
}
|
|
10
|
+
/*
|
|
11
|
+
* A scroll container clips an outset ring against its own edge, and children that fill the
|
|
12
|
+
* container have nowhere to put one. Draw it inside those instead — same 2px indicator,
|
|
13
|
+
* just on the other side of the border box. Zero specificity, declared after the rule above,
|
|
14
|
+
* so it overrides by document order without escalating specificity.
|
|
15
|
+
*/
|
|
16
|
+
:where(.ldt-topbar__nav, .ldt-table-wrap, .ldt-sidebar, .ldt-dialog__body) :where(:focus-visible) {
|
|
17
|
+
outline-offset: -2px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ldt-visually-hidden,
|
|
21
|
+
.ldt-sr-only {
|
|
22
|
+
position: absolute !important;
|
|
23
|
+
width: 1px !important;
|
|
24
|
+
height: 1px !important;
|
|
25
|
+
padding: 0 !important;
|
|
26
|
+
margin: -1px !important;
|
|
27
|
+
overflow: hidden !important;
|
|
28
|
+
clip: rect(0, 0, 0, 0) !important;
|
|
29
|
+
white-space: nowrap !important;
|
|
30
|
+
border: 0 !important;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ldt-skip-link {
|
|
34
|
+
position: fixed;
|
|
35
|
+
z-index: var(--loidolt-z-skip-link);
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
padding: 0.75rem 1rem;
|
|
39
|
+
color: var(--loidolt-on-accent);
|
|
40
|
+
background: var(--loidolt-accent);
|
|
41
|
+
transform: translateY(-110%);
|
|
42
|
+
}
|
|
43
|
+
.ldt-skip-link:focus {
|
|
44
|
+
transform: translateY(0);
|
|
45
|
+
}
|
|
46
|
+
.ldt-touch-target {
|
|
47
|
+
min-width: 44px;
|
|
48
|
+
min-height: 44px;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
* No `!important` here. Inside a cascade layer it would beat even an app's unlayered
|
|
53
|
+
* `!important`, since importance reverses layer order — an app could not opt a deliberate
|
|
54
|
+
* animation back in. This file is imported into `loidolt.a11y`, the last of our layers, so
|
|
55
|
+
* plain declarations already override every component animation while app CSS still wins.
|
|
56
|
+
*/
|
|
57
|
+
@media (prefers-reduced-motion: reduce) {
|
|
58
|
+
:where(*, *::before, *::after) {
|
|
59
|
+
scroll-behavior: auto;
|
|
60
|
+
animation-duration: 0.01ms;
|
|
61
|
+
animation-iteration-count: 1;
|
|
62
|
+
transition-duration: 0.01ms;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media (forced-colors: active) {
|
|
67
|
+
:where(button, input, select, textarea, [role='button']) {
|
|
68
|
+
border: 1px solid ButtonText;
|
|
69
|
+
}
|
|
70
|
+
:where(:focus-visible) {
|
|
71
|
+
outline-color: Highlight;
|
|
72
|
+
}
|
|
73
|
+
}
|
package/src/base.css
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/* Deep slice: assumes the token custom properties are already loaded.
|
|
2
|
+
Import '@loidolt/theme-styles/tokens' (or the whole '@loidolt/theme-styles') first. */
|
|
3
|
+
:where(*, *::before, *::after) {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
}
|
|
6
|
+
:where(html) {
|
|
7
|
+
color-scheme: light;
|
|
8
|
+
background: var(--loidolt-background);
|
|
9
|
+
font-family: var(--loidolt-font-display);
|
|
10
|
+
font-size: 100%;
|
|
11
|
+
line-height: var(--loidolt-font-line-height-normal);
|
|
12
|
+
}
|
|
13
|
+
:where(body) {
|
|
14
|
+
min-width: 20rem;
|
|
15
|
+
min-height: 100dvh;
|
|
16
|
+
margin: 0;
|
|
17
|
+
color: var(--loidolt-text);
|
|
18
|
+
background: var(--loidolt-background);
|
|
19
|
+
-webkit-font-smoothing: antialiased;
|
|
20
|
+
}
|
|
21
|
+
:where(button, input, select, textarea) {
|
|
22
|
+
color: inherit;
|
|
23
|
+
font: inherit;
|
|
24
|
+
}
|
|
25
|
+
:where(button, summary) {
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
}
|
|
28
|
+
:where(button:disabled, input:disabled, select:disabled, textarea:disabled) {
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
}
|
|
31
|
+
:where(a) {
|
|
32
|
+
color: var(--loidolt-text-accent);
|
|
33
|
+
text-underline-offset: 0.18em;
|
|
34
|
+
}
|
|
35
|
+
:where(img, svg, video) {
|
|
36
|
+
display: block;
|
|
37
|
+
max-width: 100%;
|
|
38
|
+
}
|
|
39
|
+
:where(h1, h2, h3, h4, p) {
|
|
40
|
+
margin-block-start: 0;
|
|
41
|
+
}
|
|
42
|
+
:where(h1, h2, h3, h4) {
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
line-height: var(--loidolt-font-line-height-tight);
|
|
45
|
+
}
|
|
46
|
+
:where(code, pre, kbd, samp) {
|
|
47
|
+
font-family: var(--loidolt-font-mono);
|
|
48
|
+
}
|
|
49
|
+
:where(::selection) {
|
|
50
|
+
color: var(--loidolt-on-accent);
|
|
51
|
+
background: var(--loidolt-accent);
|
|
52
|
+
}
|