@sethmakes/css 0.1.0 → 0.1.1
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/index.css +2 -2
- package/package.json +2 -2
- package/src/appbar.css +34 -0
- package/src/badge.css +8 -0
- package/src/button.css +25 -0
- package/src/media.css +8 -1
- package/src/utilities.css +15 -0
package/index.css
CHANGED
|
@@ -13,8 +13,6 @@
|
|
|
13
13
|
* tokens-only consumption stays possible.
|
|
14
14
|
*/
|
|
15
15
|
|
|
16
|
-
/* mk.utilities is declared-but-empty: reserved so adding utilities later
|
|
17
|
-
can't reorder the cascade. */
|
|
18
16
|
@layer mk.reset, mk.base, mk.components, mk.utilities;
|
|
19
17
|
|
|
20
18
|
@import "./src/reset.css";
|
|
@@ -24,6 +22,7 @@
|
|
|
24
22
|
@import "./src/badge.css";
|
|
25
23
|
@import "./src/forms.css";
|
|
26
24
|
@import "./src/card.css";
|
|
25
|
+
@import "./src/appbar.css";
|
|
27
26
|
@import "./src/table.css";
|
|
28
27
|
@import "./src/divider.css";
|
|
29
28
|
@import "./src/disclosure.css";
|
|
@@ -32,3 +31,4 @@
|
|
|
32
31
|
@import "./src/progress.css";
|
|
33
32
|
@import "./src/media.css";
|
|
34
33
|
@import "./src/empty.css";
|
|
34
|
+
@import "./src/utilities.css";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sethmakes/css",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Class-based styles for native HTML in the sethmakes design language.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"src"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@sethmakes/tokens": "0.1.
|
|
21
|
+
"@sethmakes/tokens": "0.1.1"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
24
24
|
"css",
|
package/src/appbar.css
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@layer mk.components {
|
|
2
|
+
/*
|
|
3
|
+
* App bar — sticky app chrome. The translucent surface + backdrop blur is
|
|
4
|
+
* the one sanctioned translucency in the language: chrome floats over
|
|
5
|
+
* scrolling content, everything else is opaque tonal. Sits on the chrome
|
|
6
|
+
* elevation layer (below overlays and toasts, by policy). Safe-area
|
|
7
|
+
* padded for notched devices.
|
|
8
|
+
*/
|
|
9
|
+
.mk-appbar {
|
|
10
|
+
position: sticky;
|
|
11
|
+
top: 0;
|
|
12
|
+
z-index: var(--mk-layer-chrome);
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: var(--mk-space-4);
|
|
16
|
+
padding-block: var(--mk-space-3);
|
|
17
|
+
padding-inline: max(var(--mk-space-4), env(safe-area-inset-left))
|
|
18
|
+
max(var(--mk-space-4), env(safe-area-inset-right));
|
|
19
|
+
background: color-mix(in oklch, var(--mk-color-surface-1) 88%, transparent);
|
|
20
|
+
backdrop-filter: blur(8px);
|
|
21
|
+
-webkit-backdrop-filter: blur(8px);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/*
|
|
25
|
+
* Bottom variant — mobile tab-bar chrome. Same surface, pinned to the
|
|
26
|
+
* bottom edge, padded past the home indicator.
|
|
27
|
+
*/
|
|
28
|
+
.mk-appbar--bottom {
|
|
29
|
+
top: auto;
|
|
30
|
+
bottom: 0;
|
|
31
|
+
padding-block: var(--mk-space-2)
|
|
32
|
+
max(var(--mk-space-2), env(safe-area-inset-bottom));
|
|
33
|
+
}
|
|
34
|
+
}
|
package/src/badge.css
CHANGED
|
@@ -32,6 +32,14 @@
|
|
|
32
32
|
color: var(--mk-color-danger);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
/*
|
|
36
|
+
* sm — dense list rows. Same type size (xs is already the floor of the
|
|
37
|
+
* scale); only the padding tightens, so dense badges stay legible.
|
|
38
|
+
*/
|
|
39
|
+
.mk-badge--sm {
|
|
40
|
+
padding: 0.1em 0.6em;
|
|
41
|
+
}
|
|
42
|
+
|
|
35
43
|
/* Status dot — leading indicator in currentColor */
|
|
36
44
|
.mk-badge--dot::before {
|
|
37
45
|
content: "";
|
package/src/button.css
CHANGED
|
@@ -55,6 +55,20 @@
|
|
|
55
55
|
background: color-mix(in oklch, var(--mk-color-danger), var(--mk-color-text) 12%);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
/*
|
|
59
|
+
* Active/selected — an honest state for nav tabs, segmented choices, and
|
|
60
|
+
* toggles, instead of faking it with tonal-vs-ghost contrast. Accent-subtle
|
|
61
|
+
* so it reads "chosen" without competing with primary actions.
|
|
62
|
+
*/
|
|
63
|
+
.mk-btn--active {
|
|
64
|
+
background: var(--mk-color-accent-subtle);
|
|
65
|
+
color: var(--mk-color-on-accent-subtle);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.mk-btn--active:hover {
|
|
69
|
+
background: color-mix(in oklch, var(--mk-color-accent-subtle), var(--mk-color-on-accent-subtle) 8%);
|
|
70
|
+
}
|
|
71
|
+
|
|
58
72
|
/* Sizes */
|
|
59
73
|
.mk-btn--sm {
|
|
60
74
|
font-size: var(--mk-text-xs);
|
|
@@ -62,6 +76,17 @@
|
|
|
62
76
|
min-height: 36px;
|
|
63
77
|
}
|
|
64
78
|
|
|
79
|
+
/*
|
|
80
|
+
* xs — pointer-dense UIs (table rows, list actions). Deliberately below
|
|
81
|
+
* the 44px touch floor: on touch-first surfaces prefer --sm, or give the
|
|
82
|
+
* row itself the tap target (as .mk-choice does).
|
|
83
|
+
*/
|
|
84
|
+
.mk-btn--xs {
|
|
85
|
+
font-size: var(--mk-text-xs);
|
|
86
|
+
padding: 0.3em 0.9em;
|
|
87
|
+
min-height: 28px;
|
|
88
|
+
}
|
|
89
|
+
|
|
65
90
|
.mk-btn--lg {
|
|
66
91
|
font-size: var(--mk-text-md);
|
|
67
92
|
padding: 0.7em 1.6em;
|
package/src/media.css
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
overflow: hidden;
|
|
13
13
|
background: var(--mk-color-surface-2);
|
|
14
14
|
border-radius: var(--mk-radius-surface);
|
|
15
|
+
/* Size container so the fallback initial can scale to the box */
|
|
16
|
+
container-type: inline-size;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.mk-thumb--square {
|
|
@@ -42,7 +44,12 @@
|
|
|
42
44
|
place-content: center;
|
|
43
45
|
background: var(--mk-color-surface-3);
|
|
44
46
|
color: var(--mk-color-text-muted);
|
|
45
|
-
|
|
47
|
+
/*
|
|
48
|
+
* Scales with the box (the thumb is a size container): a 36px list
|
|
49
|
+
* thumb gets small type, a full poster gets display size. Clamped to
|
|
50
|
+
* the type scale at both ends.
|
|
51
|
+
*/
|
|
52
|
+
font-size: clamp(var(--mk-text-sm), 40cqw, var(--mk-text-3xl));
|
|
46
53
|
font-weight: var(--mk-weight-bold);
|
|
47
54
|
line-height: var(--mk-leading-tight);
|
|
48
55
|
text-transform: uppercase;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
@layer mk.utilities {
|
|
2
|
+
/*
|
|
3
|
+
* Link reset — for composite links (card-as-link, nav tabs, logos) where
|
|
4
|
+
* the global accent-and-underline treatment is wrong. Lives in the
|
|
5
|
+
* utilities layer so it beats mk.base without specificity games.
|
|
6
|
+
*/
|
|
7
|
+
.mk-link-reset {
|
|
8
|
+
color: inherit;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mk-link-reset:hover {
|
|
12
|
+
color: inherit;
|
|
13
|
+
text-decoration: none;
|
|
14
|
+
}
|
|
15
|
+
}
|