@loidolt/theme-styles 0.5.0 → 0.6.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.
@@ -237,3 +237,40 @@
237
237
  width: 4.5rem;
238
238
  }
239
239
  }
240
+ /*
241
+ * A removable value — a chosen option, an active filter. Square, because it is pressable; the
242
+ * pill silhouette is reserved for badges, which are not.
243
+ */
244
+ .ldt-chip {
245
+ display: inline-flex;
246
+ align-items: center;
247
+ gap: 0.2rem;
248
+ min-height: 1.5rem;
249
+ max-width: 100%;
250
+ border: var(--loidolt-border-width) solid var(--loidolt-border-control);
251
+ padding-inline-start: 0.45rem;
252
+ color: var(--loidolt-text);
253
+ background: var(--loidolt-surface-alt);
254
+ font: var(--loidolt-font-size-sm) var(--loidolt-font-utility);
255
+ letter-spacing: 0.04em;
256
+ }
257
+ .ldt-chip > span {
258
+ overflow: hidden;
259
+ text-overflow: ellipsis;
260
+ white-space: nowrap;
261
+ }
262
+ .ldt-chip__remove {
263
+ display: inline-grid;
264
+ flex: none;
265
+ place-items: center;
266
+ width: 1.5rem;
267
+ min-height: 1.5rem;
268
+ border: 0;
269
+ padding: 0;
270
+ color: var(--loidolt-text-muted);
271
+ background: transparent;
272
+ }
273
+ .ldt-chip__remove:hover:not(:disabled) {
274
+ color: var(--loidolt-text-inverse);
275
+ background: var(--loidolt-surface-inverse);
276
+ }
@@ -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
+ }
@@ -6,4 +6,5 @@
6
6
  @import './components/overlays.css';
7
7
  @import './components/selection.css';
8
8
  @import './components/layout.css';
9
+ @import './components/media.css';
9
10
  @import './components/prose.css';
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
  }