mote.css 0.6.1 → 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/CHANGELOG.md +50 -1
- package/README.md +8 -2
- package/mote.components.css +44 -4
- package/mote.css +31 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,7 +5,55 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
-
## [0.
|
|
8
|
+
## [0.7.0] - 2026-10-21
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- **Badges are gated** (same as buttons): a plain `.mote-badge` is always
|
|
13
|
+
accent-tinted; a status class on the badge itself provides the tint —
|
|
14
|
+
never inherited from context. Closes the "tag chips silently re-tint
|
|
15
|
+
inside themed cards" surprise from four evaluation rounds.
|
|
16
|
+
Two-tier principle: **content surfaces follow context; content markers
|
|
17
|
+
and actions declare their own status.**
|
|
18
|
+
|
|
19
|
+
### Fixed
|
|
20
|
+
|
|
21
|
+
- `.mote-table-scroll` sticky-header borders: Chromium paints collapsed
|
|
22
|
+
borders at the original flow position, not with the sticky cell —
|
|
23
|
+
switched to `border-collapse: separate; border-spacing: 0` inside the
|
|
24
|
+
wrapper.
|
|
25
|
+
- `.mote-table-scroll` clips rows in print: `max-height: none;
|
|
26
|
+
overflow: visible` added to the `@media print` block.
|
|
27
|
+
- Bare `<pre>` without `<code>` now gets the mono stack and 0.875rem size.
|
|
28
|
+
- `.mote-btn` now reads `var(--mote-control-pad, …)` instead of hardcoded
|
|
29
|
+
`0.5rem 1.1rem` — density overrides reach all buttons uniformly.
|
|
30
|
+
- Form controls (input/select/textarea) now read the same density tokens
|
|
31
|
+
as buttons: `var(--mote-control-pad, …) var(--mote-control-pad-inline, …)`.
|
|
32
|
+
- `.mote-stack` now stretches `progress` and `meter` alongside fields.
|
|
33
|
+
- `.mote-doc > aside` resets to `position: static` under 50rem (was
|
|
34
|
+
staying sticky while the nav went static — clipped scroll region on mobile).
|
|
35
|
+
- `.mote-table-scroll` max-height tokenized: `var(--mote-table-max, 60vh)`.
|
|
36
|
+
- Badge links get a hover state: `filter: brightness(0.92)`.
|
|
37
|
+
- Docs: theme-toggle snippet now 3-state (auto→light→dark) matching the
|
|
38
|
+
working demo; Patterns error-page uses `.mote-hero`; docs' own header
|
|
39
|
+
uses `.mote-row`/`.mote-push` instead of inline styles.
|
|
40
|
+
|
|
41
|
+
### Added
|
|
42
|
+
|
|
43
|
+
- `.mote-hero`: vertically centers content in the remaining viewport
|
|
44
|
+
height — for error pages, login screens, empty states. Uses
|
|
45
|
+
`--mote-hero-offset` (default 12rem) to account for header/footer.
|
|
46
|
+
- `.mote-card-media`: flush-top cover images for cards — negative margins,
|
|
47
|
+
clipped overflow, radius matched to the card, all in one class. Replaces
|
|
48
|
+
the 5-line page recipe that broke card corners.
|
|
49
|
+
- `.mote-brand`: quiet wordmark link for site headers — `font-weight: 700`,
|
|
50
|
+
fg color, no underline.
|
|
51
|
+
- `.mote-num`: right-aligned tabular figures for data table columns.
|
|
52
|
+
|
|
53
|
+
### Changed (evaluation)
|
|
54
|
+
|
|
55
|
+
- Fourth ten-app evaluation completed against v0.6.1; all round-3 fixes
|
|
56
|
+
verified holding. Round-4 findings addressed in this minor release.
|
|
9
57
|
|
|
10
58
|
### Fixed
|
|
11
59
|
|
|
@@ -376,6 +424,7 @@ Components:
|
|
|
376
424
|
- Element gallery demo page (`demo.html`).
|
|
377
425
|
|
|
378
426
|
[0.3.0]: https://gitlab.com/abmach/mote/compare/v0.2.1...v0.3.0
|
|
427
|
+
[0.7.0]: https://gitlab.com/abmach/mote/compare/v0.6.1...v0.7.0
|
|
379
428
|
[0.6.1]: https://gitlab.com/abmach/mote/compare/v0.6.0...v0.6.1
|
|
380
429
|
[0.6.0]: https://gitlab.com/abmach/mote/compare/v0.5.1...v0.6.0
|
|
381
430
|
[0.5.1]: https://gitlab.com/abmach/mote/compare/v0.5.0...v0.5.1
|
package/README.md
CHANGED
|
@@ -151,11 +151,15 @@ mote is class-optional by design — elements are styled from tags alone; these
|
|
|
151
151
|
| Semantic buttons (gated) | `class="mote-success"` etc. on the button itself — themed sections never recolor actions |
|
|
152
152
|
| Ghost buttons | `.mote-ghost` — transparent fill; status tints from the button's own class (gated like solids) |
|
|
153
153
|
| Solid button on any element | `.mote-btn` — the full solid recipe for anchors, spans; status classes gated |
|
|
154
|
+
| Hero centering | `.mote-hero` — vertically centers content for error/login/empty-state pages |
|
|
155
|
+
| Card cover media | `.mote-card-media` — flush-top cover images with matched radius |
|
|
156
|
+
| Brand/wordmark | `.mote-brand` — quiet non-nav link for site headers |
|
|
154
157
|
| Media objects | `.mote-media` — avatar/icon beside body (flex, last child grows) |
|
|
155
158
|
| Display text | `.mote-display` — opt-in hero/error-code scale via `--mote-display` |
|
|
156
159
|
| Content rows | `.mote-row` + `.mote-push` — flex row, right-align helper |
|
|
157
160
|
| Stacked forms | `.mote-stack` — opt-in full-width fields, checkboxes stay 1em |
|
|
158
161
|
| Scrollable tables | `.mote-table-scroll` — sticky `thead`, no page scroll, no margin jump |
|
|
162
|
+
| Numeric columns | `.mote-num` — right-aligned tabular figures |
|
|
159
163
|
| Sparse grids | `.mote-grid-sparse` — auto-fit variant, collapses empty tracks |
|
|
160
164
|
| Pagination | `nav[aria-label="pagination"]` — semantic, no class |
|
|
161
165
|
| Table of contents | `nav[aria-label="toc"]` — semantic, no class |
|
|
@@ -164,10 +168,12 @@ mote is class-optional by design — elements are styled from tags alone; these
|
|
|
164
168
|
| Print helpers | `.mote-no-print` / `.mote-print-only` |
|
|
165
169
|
| Theme-switch guard | `.mote-theme-switch` — prevents Chromium stale-color bug on `data-theme` flips |
|
|
166
170
|
| Status inheritance control | `.mote-default` (force accent) · `.mote-reset` (clear inherited status) |
|
|
171
|
+
| Hero offset | `--mote-hero-offset` (default 12rem) — space for header/footer in `.mote-hero` |
|
|
172
|
+
| Table max height | `--mote-table-max` (default 60vh) — `.mote-table-scroll` panel cap |
|
|
167
173
|
| Breadcrumbs | `nav[aria-label="breadcrumb"]` — semantic, no class |
|
|
168
174
|
| Card grids | `.mote-grid` — auto-fill columns from the container, no breakpoints |
|
|
169
175
|
| Cards | `.mote-card` |
|
|
170
|
-
| Badges | `.mote-badge`
|
|
176
|
+
| Badges | `.mote-badge` — gated: status from the badge's own class, never inherited |
|
|
171
177
|
| Avatars | `.mote-avatar` |
|
|
172
178
|
| Skeleton / spinner | `.mote-skeleton`, `.mote-spinner` |
|
|
173
179
|
| Tooltips | `[popover].mote-tooltip` + `popovertarget` button |
|
|
@@ -189,7 +195,7 @@ animations become instant, on older engines.
|
|
|
189
195
|
|
|
190
196
|
## Demo
|
|
191
197
|
|
|
192
|
-
Open [`docs/index.html`](docs/index.html) for the full live documentation, or [`demo.html`](demo.html) for a quick gallery of every styled element.
|
|
198
|
+
Open [`docs/index.html`](docs/index.html) for the full live documentation, or [`docs/demo.html`](docs/demo.html) for a quick gallery of every styled element.
|
|
193
199
|
|
|
194
200
|
## License
|
|
195
201
|
|
package/mote.components.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* mote.components.css — opt-in components for mote.css.
|
|
3
|
-
* v0.
|
|
3
|
+
* v0.7.0 · MIT
|
|
4
4
|
* https://gitlab.com/abmach/mote · mirror: https://github.com/abmach/mote
|
|
5
5
|
*
|
|
6
6
|
* Requires mote.css loaded first (provides the --mote-* tokens).
|
|
@@ -40,6 +40,10 @@
|
|
|
40
40
|
* <span class="mote-badge mote-success">success</span>
|
|
41
41
|
* ------------------------------------------------------------------------- */
|
|
42
42
|
|
|
43
|
+
/* Badges are content markers, not surfaces — they declare their own
|
|
44
|
+
status, never inherit it from context (same gating as buttons).
|
|
45
|
+
A plain .mote-badge is always accent-tinted; a status class on the
|
|
46
|
+
badge itself provides the tint. */
|
|
43
47
|
.mote-badge {
|
|
44
48
|
display: inline-block;
|
|
45
49
|
padding: 0.1rem 0.6rem;
|
|
@@ -47,8 +51,13 @@
|
|
|
47
51
|
font-size: 0.8em;
|
|
48
52
|
font-weight: 500;
|
|
49
53
|
line-height: 1.4;
|
|
50
|
-
background: var(--mote-
|
|
51
|
-
color: var(--mote-
|
|
54
|
+
background: var(--mote-accent-soft);
|
|
55
|
+
color: var(--mote-accent-deep);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.mote-badge:where(.mote-success, .mote-warning, .mote-error, .mote-info, .mote-muted) {
|
|
59
|
+
background: var(--mote-status-soft);
|
|
60
|
+
color: var(--mote-status);
|
|
52
61
|
}
|
|
53
62
|
|
|
54
63
|
/* Badges as links (tag chips, version pills): kill the underline */
|
|
@@ -56,6 +65,10 @@ a:where(.mote-badge) {
|
|
|
56
65
|
text-decoration: none;
|
|
57
66
|
}
|
|
58
67
|
|
|
68
|
+
a:where(.mote-badge):hover {
|
|
69
|
+
filter: brightness(0.92);
|
|
70
|
+
}
|
|
71
|
+
|
|
59
72
|
/* ---------------------------------------------------------------------------
|
|
60
73
|
* 3. Avatars
|
|
61
74
|
* ------------------------------------------------------------------------- */
|
|
@@ -245,15 +258,36 @@ nav[aria-label="toc"] a:hover {
|
|
|
245
258
|
color: var(--mote-accent-deep);
|
|
246
259
|
}
|
|
247
260
|
|
|
261
|
+
/* Flush-top cover media for cards: negative margins derived from the
|
|
262
|
+
card's own padding, clipped overflow, radius matched to the card. */
|
|
263
|
+
.mote-card-media {
|
|
264
|
+
margin: -1.25rem -1.5rem 1rem;
|
|
265
|
+
overflow: clip;
|
|
266
|
+
border-radius: calc(var(--mote-radius-lg) - var(--mote-border-width))
|
|
267
|
+
calc(var(--mote-radius-lg) - var(--mote-border-width)) 0 0;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.mote-card-media img,
|
|
271
|
+
.mote-card-media video {
|
|
272
|
+
display: block;
|
|
273
|
+
width: 100%;
|
|
274
|
+
max-width: none;
|
|
275
|
+
border-radius: inherit;
|
|
276
|
+
}
|
|
277
|
+
|
|
248
278
|
/* Scrollable table wrapper: sticky thead, no page scroll, no margin jump */
|
|
249
279
|
.mote-table-scroll {
|
|
250
280
|
overflow-x: auto;
|
|
251
|
-
max-height: 60vh;
|
|
281
|
+
max-height: var(--mote-table-max, 60vh);
|
|
252
282
|
overflow-y: auto;
|
|
253
283
|
}
|
|
254
284
|
|
|
285
|
+
/* Chromium paints collapsed borders at the original flow position,
|
|
286
|
+
not with the sticky cell — separate borders belong to the cell. */
|
|
255
287
|
.mote-table-scroll table {
|
|
256
288
|
margin-block: 0;
|
|
289
|
+
border-collapse: separate;
|
|
290
|
+
border-spacing: 0;
|
|
257
291
|
}
|
|
258
292
|
|
|
259
293
|
.mote-table-scroll thead th {
|
|
@@ -623,6 +657,12 @@ nav[aria-label="toc"] :is(h2, h3) {
|
|
|
623
657
|
grid-row: auto;
|
|
624
658
|
}
|
|
625
659
|
|
|
660
|
+
.mote-doc > aside {
|
|
661
|
+
position: static;
|
|
662
|
+
max-height: none;
|
|
663
|
+
overflow: visible;
|
|
664
|
+
}
|
|
665
|
+
|
|
626
666
|
.mote-doc > nav {
|
|
627
667
|
position: static;
|
|
628
668
|
max-height: none;
|
package/mote.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* mote.css — a mote of styling for plain HTML.
|
|
3
|
-
* v0.
|
|
3
|
+
* v0.7.0 · MIT
|
|
4
4
|
* https://gitlab.com/abmach/mote · mirror: https://github.com/abmach/mote
|
|
5
5
|
*
|
|
6
6
|
* The smallest thing that can carry style:
|
|
@@ -335,6 +335,8 @@ kbd {
|
|
|
335
335
|
pre {
|
|
336
336
|
padding: 1rem 1.2rem;
|
|
337
337
|
overflow-x: auto;
|
|
338
|
+
font-family: var(--mote-font-mono);
|
|
339
|
+
font-size: 0.875rem;
|
|
338
340
|
border-radius: var(--mote-radius);
|
|
339
341
|
background: var(--mote-surface);
|
|
340
342
|
border: var(--mote-border-width) solid var(--mote-border);
|
|
@@ -415,7 +417,7 @@ legend { padding-inline: 0.4rem; font-weight: 600; }
|
|
|
415
417
|
input, select, textarea {
|
|
416
418
|
font: inherit;
|
|
417
419
|
color: inherit;
|
|
418
|
-
padding: 0.5rem 0.75rem;
|
|
420
|
+
padding: var(--mote-control-pad, 0.5rem) var(--mote-control-pad-inline, 0.75rem);
|
|
419
421
|
background: var(--mote-surface);
|
|
420
422
|
border: var(--mote-border-width) solid var(--mote-border);
|
|
421
423
|
border-radius: var(--mote-radius-sm);
|
|
@@ -666,9 +668,20 @@ progress, meter {
|
|
|
666
668
|
|
|
667
669
|
.mote-push { margin-inline-start: auto; }
|
|
668
670
|
|
|
671
|
+
/* Hero: vertically center content in the remaining viewport height.
|
|
672
|
+
For error pages, login screens, empty states. */
|
|
673
|
+
.mote-hero {
|
|
674
|
+
min-height: calc(100svh - var(--mote-hero-offset, 12rem));
|
|
675
|
+
display: flex;
|
|
676
|
+
flex-direction: column;
|
|
677
|
+
justify-content: center;
|
|
678
|
+
align-items: center;
|
|
679
|
+
text-align: center;
|
|
680
|
+
}
|
|
681
|
+
|
|
669
682
|
/* Stacked forms: stretch fields, keep checkboxes/radios compact.
|
|
670
683
|
An opt-in alternative to the page-global width: 100% recipe. */
|
|
671
|
-
.mote-stack :is(input, select, textarea) {
|
|
684
|
+
.mote-stack :is(input, select, textarea, progress, meter) {
|
|
672
685
|
width: 100%;
|
|
673
686
|
}
|
|
674
687
|
|
|
@@ -688,7 +701,7 @@ progress, meter {
|
|
|
688
701
|
font: inherit;
|
|
689
702
|
font-weight: 500;
|
|
690
703
|
color: var(--mote-on-accent);
|
|
691
|
-
padding: 0.5rem 1.1rem;
|
|
704
|
+
padding: var(--mote-control-pad, 0.5rem) var(--mote-control-pad-inline, 1.1rem);
|
|
692
705
|
background: var(--mote-accent);
|
|
693
706
|
border: var(--mote-border-width) solid transparent;
|
|
694
707
|
border-radius: var(--mote-radius-sm);
|
|
@@ -735,6 +748,19 @@ progress, meter {
|
|
|
735
748
|
}
|
|
736
749
|
|
|
737
750
|
/* Visually hidden, screen-reader available */
|
|
751
|
+
/* Brand/wordmark: quiet non-nav link for site headers */
|
|
752
|
+
.mote-brand {
|
|
753
|
+
font-weight: 700;
|
|
754
|
+
color: var(--mote-fg);
|
|
755
|
+
text-decoration: none;
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
/* Numeric table column: right-align tabular figures */
|
|
759
|
+
.mote-num {
|
|
760
|
+
text-align: end;
|
|
761
|
+
font-variant-numeric: tabular-nums;
|
|
762
|
+
}
|
|
763
|
+
|
|
738
764
|
.mote-sr-only {
|
|
739
765
|
position: absolute;
|
|
740
766
|
width: 1px;
|
|
@@ -874,6 +900,7 @@ progress, meter {
|
|
|
874
900
|
/* Opt-in print helpers */
|
|
875
901
|
.mote-no-print { display: none !important; }
|
|
876
902
|
.mote-print-only { display: block; }
|
|
903
|
+
.mote-table-scroll { max-height: none; overflow: visible; }
|
|
877
904
|
}
|
|
878
905
|
|
|
879
906
|
@media not print {
|