@surflane/css 0.16.0 → 0.17.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/controls.css +12 -7
- package/foundations/typography.css +4 -3
- package/package.json +2 -2
- package/presentation/avatar.css +4 -2
- package/presentation/badge.css +4 -3
- package/presentation/banner.css +4 -2
- package/presentation/base.css +2 -1
- package/presentation/breadcrumbs.css +4 -3
- package/presentation/card.css +7 -3
- package/presentation/code.css +8 -6
- package/presentation/description-list.css +4 -2
- package/presentation/empty-state.css +4 -3
- package/presentation/pagination.css +4 -3
- package/presentation/table.css +36 -0
- package/presentation/timeline.css +4 -2
package/controls.css
CHANGED
|
@@ -14,8 +14,10 @@
|
|
|
14
14
|
border-radius: var(--surf-radius-pill);
|
|
15
15
|
background: transparent;
|
|
16
16
|
color: var(--surf-ink-muted);
|
|
17
|
-
font: var(--surf-weight-medium)
|
|
18
|
-
|
|
17
|
+
font-weight: var(--surf-weight-medium);
|
|
18
|
+
font-size: var(--surf-type-caption-size);
|
|
19
|
+
line-height: 1;
|
|
20
|
+
font-family: var(--surf-font-body);
|
|
19
21
|
letter-spacing: var(--surf-type-caption-tracking);
|
|
20
22
|
flex-shrink: 0;
|
|
21
23
|
}
|
|
@@ -103,9 +105,10 @@
|
|
|
103
105
|
border-radius: var(--surf-control-radius);
|
|
104
106
|
background: transparent;
|
|
105
107
|
color: var(--surf-ink);
|
|
106
|
-
font: var(--surf-weight-regular)
|
|
107
|
-
|
|
108
|
-
|
|
108
|
+
font-weight: var(--surf-weight-regular);
|
|
109
|
+
font-size: var(--surf-type-body-size);
|
|
110
|
+
line-height: var(--surf-type-body-leading);
|
|
111
|
+
font-family: var(--surf-font-body);
|
|
109
112
|
letter-spacing: var(--surf-type-body-tracking);
|
|
110
113
|
cursor: pointer;
|
|
111
114
|
}
|
|
@@ -128,8 +131,10 @@
|
|
|
128
131
|
|
|
129
132
|
.surf-segment {
|
|
130
133
|
min-block-size: calc(var(--surf-control-height) - 6px);
|
|
131
|
-
font: var(--surf-weight-medium)
|
|
132
|
-
|
|
134
|
+
font-weight: var(--surf-weight-medium);
|
|
135
|
+
font-size: var(--surf-type-caption-size);
|
|
136
|
+
line-height: 1;
|
|
137
|
+
font-family: var(--surf-font-body);
|
|
133
138
|
letter-spacing: var(--surf-type-caption-tracking);
|
|
134
139
|
}
|
|
135
140
|
.surf-control-group label:has(input:checked) .surf-segment {
|
|
@@ -96,9 +96,10 @@
|
|
|
96
96
|
}
|
|
97
97
|
.surf-prose {
|
|
98
98
|
max-width: var(--surf-layout-reading);
|
|
99
|
-
font: var(--surf-weight-regular)
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
font-weight: var(--surf-weight-regular);
|
|
100
|
+
font-size: var(--surf-type-reading-size);
|
|
101
|
+
line-height: var(--surf-type-reading-leading);
|
|
102
|
+
font-family: var(--surf-font-body);
|
|
102
103
|
color: var(--surf-ink-body);
|
|
103
104
|
overflow-wrap: anywhere;
|
|
104
105
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surflane/css",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Surflane's CSS-only layer: control, layout composition, document typography and presentation classes that work without React, on top of @surflane/design-tokens.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"design-system",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"./package.json": "./package.json"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"@surflane/design-tokens": "^0.
|
|
40
|
+
"@surflane/design-tokens": "^0.17.0"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
package/presentation/avatar.css
CHANGED
|
@@ -19,8 +19,10 @@
|
|
|
19
19
|
border-radius: var(--surf-radius-full);
|
|
20
20
|
background: var(--surf-recessed);
|
|
21
21
|
color: var(--surf-ink-body);
|
|
22
|
-
font: var(--surf-weight-medium)
|
|
23
|
-
|
|
22
|
+
font-weight: var(--surf-weight-medium);
|
|
23
|
+
font-size: var(--surf-type-caption-size);
|
|
24
|
+
line-height: 1;
|
|
25
|
+
font-family: var(--surf-font-body);
|
|
24
26
|
letter-spacing: var(--surf-type-caption-tracking);
|
|
25
27
|
}
|
|
26
28
|
.surf-avatar[data-size='small'] {
|
package/presentation/badge.css
CHANGED
|
@@ -15,9 +15,10 @@
|
|
|
15
15
|
border-radius: var(--surf-radius-pill);
|
|
16
16
|
background: var(--surf-badge-neutral-bg);
|
|
17
17
|
color: var(--surf-status-neutral-fg);
|
|
18
|
-
font: var(--surf-weight-medium)
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
font-weight: var(--surf-weight-medium);
|
|
19
|
+
font-size: var(--surf-type-caption-size);
|
|
20
|
+
line-height: var(--surf-type-caption-leading);
|
|
21
|
+
font-family: var(--surf-font-body);
|
|
21
22
|
overflow-wrap: anywhere;
|
|
22
23
|
}
|
|
23
24
|
.surf-badge-icon {
|
package/presentation/banner.css
CHANGED
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
padding-inline: var(--surf-banner-inset, var(--surf-space-4));
|
|
19
19
|
background: var(--surf-status-info-bg);
|
|
20
20
|
color: var(--surf-status-info-fg);
|
|
21
|
-
font: var(--surf-weight-regular)
|
|
22
|
-
|
|
21
|
+
font-weight: var(--surf-weight-regular);
|
|
22
|
+
font-size: var(--surf-type-body-size);
|
|
23
|
+
line-height: var(--surf-type-body-leading);
|
|
24
|
+
font-family: var(--surf-font-body);
|
|
23
25
|
letter-spacing: var(--surf-type-body-tracking);
|
|
24
26
|
}
|
|
25
27
|
.surf-banner[data-tone='caution'] {
|
package/presentation/base.css
CHANGED
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
max-width: 100%;
|
|
22
22
|
}
|
|
23
23
|
.surf-breadcrumbs {
|
|
24
|
-
font: var(--surf-weight-regular)
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
font-weight: var(--surf-weight-regular);
|
|
25
|
+
font-size: var(--surf-type-caption-size);
|
|
26
|
+
line-height: var(--surf-type-caption-leading);
|
|
27
|
+
font-family: var(--surf-font-body);
|
|
27
28
|
}
|
|
28
29
|
.surf-breadcrumb-separator {
|
|
29
30
|
display: inline-flex;
|
package/presentation/card.css
CHANGED
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
/* Cards use one surface; children provide hierarchy without extra frames. */
|
|
7
7
|
.surf-card {
|
|
8
8
|
display: grid;
|
|
9
|
+
/* Stretched to a taller neighbor in a row, a card keeps its parts at the top
|
|
10
|
+
and leaves the extra height below them. */
|
|
11
|
+
align-content: start;
|
|
9
12
|
gap: var(--surf-space-4);
|
|
10
13
|
min-width: 0;
|
|
11
14
|
padding: var(--surf-surface-padding, var(--surf-space-6));
|
|
@@ -36,9 +39,10 @@
|
|
|
36
39
|
.surf-card-title {
|
|
37
40
|
margin: 0;
|
|
38
41
|
color: var(--surf-ink);
|
|
39
|
-
font: var(--surf-weight-medium)
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
font-weight: var(--surf-weight-medium);
|
|
43
|
+
font-size: var(--surf-type-section-size);
|
|
44
|
+
line-height: var(--surf-type-section-leading);
|
|
45
|
+
font-family: var(--surf-font-body);
|
|
42
46
|
letter-spacing: var(--surf-type-section-tracking);
|
|
43
47
|
overflow-wrap: anywhere;
|
|
44
48
|
}
|
package/presentation/code.css
CHANGED
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
}
|
|
28
28
|
.surf-code-language {
|
|
29
29
|
color: var(--surf-ink-muted);
|
|
30
|
-
font: var(--surf-weight-regular)
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
font-weight: var(--surf-weight-regular);
|
|
31
|
+
font-size: var(--surf-type-caption-size);
|
|
32
|
+
line-height: var(--surf-type-caption-leading);
|
|
33
|
+
font-family: var(--surf-font-code);
|
|
33
34
|
letter-spacing: var(--surf-tracking-mono);
|
|
34
35
|
}
|
|
35
36
|
.surf-code-block > :is(.surf-scroll-root, .surf-code-scroll) {
|
|
@@ -39,9 +40,10 @@
|
|
|
39
40
|
.surf-code-text {
|
|
40
41
|
margin: 0;
|
|
41
42
|
padding: var(--surf-space-4);
|
|
42
|
-
font: var(--surf-weight-regular)
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
font-weight: var(--surf-weight-regular);
|
|
44
|
+
font-size: var(--surf-type-code-size);
|
|
45
|
+
line-height: var(--surf-type-code-leading);
|
|
46
|
+
font-family: var(--surf-font-code);
|
|
45
47
|
letter-spacing: var(--surf-tracking-mono);
|
|
46
48
|
font-variant-ligatures: none;
|
|
47
49
|
white-space: pre;
|
|
@@ -21,8 +21,10 @@
|
|
|
21
21
|
align-items: start;
|
|
22
22
|
column-gap: var(--surf-description-list-gap);
|
|
23
23
|
margin: 0;
|
|
24
|
-
font: var(--surf-weight-regular)
|
|
25
|
-
|
|
24
|
+
font-weight: var(--surf-weight-regular);
|
|
25
|
+
font-size: var(--surf-size-font-default);
|
|
26
|
+
line-height: var(--surf-description-list-leading);
|
|
27
|
+
font-family: var(--surf-font-body);
|
|
26
28
|
letter-spacing: var(--surf-type-body-tracking);
|
|
27
29
|
}
|
|
28
30
|
/* Two columns where both fit, one where they do not. */
|
|
@@ -27,9 +27,10 @@
|
|
|
27
27
|
block-size: var(--surf-space-8);
|
|
28
28
|
}
|
|
29
29
|
.surf-empty-title {
|
|
30
|
-
font: var(--surf-weight-medium)
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
font-weight: var(--surf-weight-medium);
|
|
31
|
+
font-size: var(--surf-type-section-size);
|
|
32
|
+
line-height: var(--surf-type-section-leading);
|
|
33
|
+
font-family: var(--surf-font-display);
|
|
33
34
|
letter-spacing: var(--surf-type-section-tracking);
|
|
34
35
|
color: var(--surf-ink);
|
|
35
36
|
margin: 0;
|
|
@@ -37,9 +37,10 @@
|
|
|
37
37
|
background: transparent;
|
|
38
38
|
color: var(--surf-ink);
|
|
39
39
|
text-decoration: none;
|
|
40
|
-
font: var(--surf-weight-medium)
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
font-weight: var(--surf-weight-medium);
|
|
41
|
+
font-size: var(--surf-type-label-size);
|
|
42
|
+
line-height: var(--surf-type-label-leading);
|
|
43
|
+
font-family: var(--surf-font-body);
|
|
43
44
|
letter-spacing: var(--surf-type-label-tracking);
|
|
44
45
|
}
|
|
45
46
|
.surf-pagination .surf-pagination-control[aria-current='page'] {
|
package/presentation/table.css
CHANGED
|
@@ -14,6 +14,31 @@
|
|
|
14
14
|
* while an inherited overflow-wrap: anywhere would squeeze columns mid-word. */
|
|
15
15
|
overflow-wrap: break-word;
|
|
16
16
|
}
|
|
17
|
+
/* Fixed columns take their width from Table.Column and the header row, so they
|
|
18
|
+
hold still while rows turn into skeletons or a message. */
|
|
19
|
+
.surf-table[data-layout='fixed'] {
|
|
20
|
+
table-layout: fixed;
|
|
21
|
+
}
|
|
22
|
+
/* One line per cell; Table.Truncate ends what does not fit. */
|
|
23
|
+
.surf-table[data-nowrap] .surf-table-cell {
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
overflow-wrap: normal;
|
|
26
|
+
}
|
|
27
|
+
/* A Container whose table steps columns aside measures its own width. Only then:
|
|
28
|
+
a container sized by its width no longer grows with its content. */
|
|
29
|
+
.surf-table-container:has(.surf-table [data-hide-below]) {
|
|
30
|
+
container: surf-table / inline-size;
|
|
31
|
+
}
|
|
32
|
+
@container surf-table (max-width: 40rem) {
|
|
33
|
+
.surf-table [data-hide-below='md'] {
|
|
34
|
+
display: none;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
@container surf-table (max-width: 30rem) {
|
|
38
|
+
.surf-table [data-hide-below] {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
17
42
|
.surf-table-caption {
|
|
18
43
|
text-align: start;
|
|
19
44
|
font-weight: var(--surf-weight-regular);
|
|
@@ -274,6 +299,17 @@
|
|
|
274
299
|
> :first-child::after {
|
|
275
300
|
opacity: 1;
|
|
276
301
|
}
|
|
302
|
+
/* Backgrounds turn to the canvas, so a sticky column's edge keeps its line in the
|
|
303
|
+
text color. */
|
|
304
|
+
@media (forced-colors: active) {
|
|
305
|
+
.surf-table[data-sticky-column]
|
|
306
|
+
> :is(.surf-table-head, .surf-table-body, .surf-table-foot)
|
|
307
|
+
> .surf-table-row
|
|
308
|
+
> :first-child::after {
|
|
309
|
+
background: CanvasText;
|
|
310
|
+
forced-color-adjust: none;
|
|
311
|
+
}
|
|
312
|
+
}
|
|
277
313
|
.surf-table-truncate {
|
|
278
314
|
display: inline-block;
|
|
279
315
|
max-inline-size: var(--surf-table-truncate-measure, 32ch);
|
|
@@ -13,8 +13,10 @@
|
|
|
13
13
|
padding: 0;
|
|
14
14
|
list-style: none;
|
|
15
15
|
color: var(--surf-ink-body);
|
|
16
|
-
font: var(--surf-weight-regular)
|
|
17
|
-
|
|
16
|
+
font-weight: var(--surf-weight-regular);
|
|
17
|
+
font-size: var(--surf-type-body-size);
|
|
18
|
+
line-height: var(--surf-type-body-leading);
|
|
19
|
+
font-family: var(--surf-font-body);
|
|
18
20
|
letter-spacing: var(--surf-type-body-tracking);
|
|
19
21
|
}
|
|
20
22
|
.surf-timeline-item {
|