@loidolt/theme-styles 0.5.0 → 0.7.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/package.json +2 -2
- package/src/accessibility.css +86 -4
- package/src/components/actions.css +13 -0
- package/src/components/charts.css +39 -0
- package/src/components/data.css +111 -0
- package/src/components/docs.css +298 -0
- package/src/components/feedback.css +93 -0
- package/src/components/forms.css +316 -0
- package/src/components/layout.css +65 -0
- package/src/components/maps.css +323 -0
- package/src/components/media.css +478 -0
- package/src/components/overlays.css +138 -0
- package/src/components/selection.css +37 -0
- package/src/components/surfaces.css +63 -0
- package/src/components.css +4 -0
- package/src/index.css +7 -2
- package/src/utilities.css +16 -0
|
@@ -72,6 +72,15 @@
|
|
|
72
72
|
* size class the badge keeps its compact inline metrics, which is what table cells and running
|
|
73
73
|
* copy want.
|
|
74
74
|
*/
|
|
75
|
+
/* Same colour as the text, so the variant's ink carries it without a second colour rule. */
|
|
76
|
+
.ldt-badge__dot {
|
|
77
|
+
width: 0.45rem;
|
|
78
|
+
height: 0.45rem;
|
|
79
|
+
flex: none;
|
|
80
|
+
margin-inline-end: 0.35rem;
|
|
81
|
+
border-radius: var(--loidolt-border-radius-pill);
|
|
82
|
+
background: currentColor;
|
|
83
|
+
}
|
|
75
84
|
.ldt-badge--sm {
|
|
76
85
|
min-height: var(--loidolt-size-control-sm);
|
|
77
86
|
padding: 0.38rem 0.7rem;
|
|
@@ -114,6 +123,7 @@
|
|
|
114
123
|
}
|
|
115
124
|
/* A framed media box: fixed ratio, sunken or paper surface, contained content. */
|
|
116
125
|
.ldt-thumbnail {
|
|
126
|
+
position: relative;
|
|
117
127
|
display: grid;
|
|
118
128
|
place-items: center;
|
|
119
129
|
margin: 0;
|
|
@@ -133,6 +143,29 @@
|
|
|
133
143
|
.ldt-thumbnail--cover .ldt-thumbnail__image {
|
|
134
144
|
object-fit: cover;
|
|
135
145
|
}
|
|
146
|
+
/* While loading, the recessed surface shimmers so the frame reads as pending, not empty. */
|
|
147
|
+
.ldt-thumbnail[data-status='loading'] {
|
|
148
|
+
background: linear-gradient(
|
|
149
|
+
90deg,
|
|
150
|
+
var(--loidolt-surface-sunken),
|
|
151
|
+
var(--loidolt-surface-alt),
|
|
152
|
+
var(--loidolt-surface-sunken)
|
|
153
|
+
)
|
|
154
|
+
0 0 / 200% 100%;
|
|
155
|
+
animation: ldt-shimmer 1.5s linear infinite;
|
|
156
|
+
}
|
|
157
|
+
.ldt-thumbnail__overlay {
|
|
158
|
+
position: absolute;
|
|
159
|
+
inset: 0;
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: flex-end;
|
|
162
|
+
justify-content: flex-end;
|
|
163
|
+
padding: var(--loidolt-space-2);
|
|
164
|
+
pointer-events: none;
|
|
165
|
+
}
|
|
166
|
+
.ldt-thumbnail__overlay > * {
|
|
167
|
+
pointer-events: auto;
|
|
168
|
+
}
|
|
136
169
|
/* A dashboard tile: one hero number over a utility label; the link form invites a click. */
|
|
137
170
|
.ldt-stat {
|
|
138
171
|
display: block;
|
|
@@ -171,3 +204,33 @@ a.ldt-stat:hover {
|
|
|
171
204
|
min-height: 1em;
|
|
172
205
|
align-self: stretch;
|
|
173
206
|
}
|
|
207
|
+
/* A person or account, as a photo or initials. Square, like every other surface. */
|
|
208
|
+
.ldt-avatar {
|
|
209
|
+
position: relative;
|
|
210
|
+
width: var(--loidolt-size-control);
|
|
211
|
+
height: var(--loidolt-size-control);
|
|
212
|
+
display: inline-grid;
|
|
213
|
+
flex: none;
|
|
214
|
+
place-items: center;
|
|
215
|
+
overflow: hidden;
|
|
216
|
+
border: var(--loidolt-border-width) solid var(--loidolt-border);
|
|
217
|
+
color: var(--loidolt-text-muted);
|
|
218
|
+
background: var(--loidolt-surface-sunken);
|
|
219
|
+
font: var(--loidolt-font-size-sm) var(--loidolt-font-utility);
|
|
220
|
+
letter-spacing: 0.06em;
|
|
221
|
+
}
|
|
222
|
+
.ldt-avatar--sm {
|
|
223
|
+
width: var(--loidolt-size-control-sm);
|
|
224
|
+
height: var(--loidolt-size-control-sm);
|
|
225
|
+
font-size: var(--loidolt-font-size-xs);
|
|
226
|
+
}
|
|
227
|
+
.ldt-avatar--lg {
|
|
228
|
+
width: var(--loidolt-size-control-lg);
|
|
229
|
+
height: var(--loidolt-size-control-lg);
|
|
230
|
+
font-size: var(--loidolt-font-size-base);
|
|
231
|
+
}
|
|
232
|
+
.ldt-avatar__image {
|
|
233
|
+
width: 100%;
|
|
234
|
+
height: 100%;
|
|
235
|
+
object-fit: cover;
|
|
236
|
+
}
|
package/src/components.css
CHANGED
|
@@ -6,4 +6,8 @@
|
|
|
6
6
|
@import './components/overlays.css';
|
|
7
7
|
@import './components/selection.css';
|
|
8
8
|
@import './components/layout.css';
|
|
9
|
+
@import './components/media.css';
|
|
10
|
+
@import './components/charts.css';
|
|
11
|
+
@import './components/maps.css';
|
|
9
12
|
@import './components/prose.css';
|
|
13
|
+
@import './components/docs.css';
|
package/src/index.css
CHANGED
|
@@ -8,9 +8,14 @@
|
|
|
8
8
|
* `loidolt.a11y` is last so the focus ring and the reduced-motion overrides beat component
|
|
9
9
|
* styles by layer order alone — no `!important` needed, which keeps app CSS able to override
|
|
10
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.
|
|
11
16
|
*/
|
|
12
|
-
@layer loidolt.tokens, loidolt.reset, loidolt.base, loidolt.
|
|
13
|
-
loidolt.a11y;
|
|
17
|
+
@layer loidolt.tokens, loidolt.reset, loidolt.base, loidolt.vendor, loidolt.components,
|
|
18
|
+
loidolt.utilities, loidolt.a11y;
|
|
14
19
|
|
|
15
20
|
@import '@loidolt/theme-tokens/css' layer(loidolt.tokens);
|
|
16
21
|
@import './fonts.css' layer(loidolt.base);
|
package/src/utilities.css
CHANGED
|
@@ -48,6 +48,14 @@
|
|
|
48
48
|
text-overflow: ellipsis;
|
|
49
49
|
white-space: nowrap;
|
|
50
50
|
}
|
|
51
|
+
/* Truncates after `--ldt-lines` lines (default 2) with an ellipsis. */
|
|
52
|
+
.ldt-line-clamp {
|
|
53
|
+
display: -webkit-box;
|
|
54
|
+
overflow: hidden;
|
|
55
|
+
-webkit-box-orient: vertical;
|
|
56
|
+
-webkit-line-clamp: var(--ldt-lines, 2);
|
|
57
|
+
line-clamp: var(--ldt-lines, 2);
|
|
58
|
+
}
|
|
51
59
|
.ldt-scrollbar {
|
|
52
60
|
scrollbar-width: thin;
|
|
53
61
|
scrollbar-color: var(--loidolt-border) transparent;
|
|
@@ -66,8 +74,16 @@
|
|
|
66
74
|
text-transform: uppercase;
|
|
67
75
|
}
|
|
68
76
|
|
|
77
|
+
/* Print-only content — a URL written out after a link, a signature line. The counterpart to
|
|
78
|
+
`.ldt-print-hidden`. */
|
|
79
|
+
.ldt-print-visible {
|
|
80
|
+
display: none !important;
|
|
81
|
+
}
|
|
69
82
|
@media print {
|
|
70
83
|
.ldt-print-hidden {
|
|
71
84
|
display: none !important;
|
|
72
85
|
}
|
|
86
|
+
.ldt-print-visible {
|
|
87
|
+
display: revert !important;
|
|
88
|
+
}
|
|
73
89
|
}
|