@surflane/css 0.25.0 → 0.25.2
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/presentation/card.css +10 -4
- package/presentation/table.css +34 -14
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@surflane/css",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.2",
|
|
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.25.
|
|
40
|
+
"@surflane/design-tokens": "^0.25.2"
|
|
41
41
|
},
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
package/presentation/card.css
CHANGED
|
@@ -63,6 +63,8 @@
|
|
|
63
63
|
other controls on it sit above the stretch. */
|
|
64
64
|
.surf-card:has(.surf-card-action) {
|
|
65
65
|
position: relative;
|
|
66
|
+
--surf-card-control-position: relative;
|
|
67
|
+
--surf-card-control-layer: 1;
|
|
66
68
|
}
|
|
67
69
|
.surf-card-action {
|
|
68
70
|
margin: 0;
|
|
@@ -111,15 +113,19 @@
|
|
|
111
113
|
outline: var(--surf-focus-ring-width) solid var(--surf-interaction-focus);
|
|
112
114
|
outline-offset: var(--surf-focus-ring-offset);
|
|
113
115
|
}
|
|
114
|
-
/* No specificity, so a control's own position still wins.
|
|
116
|
+
/* No specificity, so a control's own position still wins. The card asks whether
|
|
117
|
+
it holds an action and passes the answer down: a :has() with selector parts
|
|
118
|
+
after it makes Chromium restyle a card's whole subtree on every insertion in
|
|
119
|
+
it, as a chart's redraw. In a card without an action both are unset, the same
|
|
120
|
+
as no rule. */
|
|
115
121
|
:where(
|
|
116
|
-
.surf-card
|
|
122
|
+
.surf-card
|
|
117
123
|
:is(a[href], button, input, select, textarea, summary, [tabindex]):not(
|
|
118
124
|
.surf-card-action
|
|
119
125
|
)
|
|
120
126
|
) {
|
|
121
|
-
position:
|
|
122
|
-
z-index:
|
|
127
|
+
position: var(--surf-card-control-position);
|
|
128
|
+
z-index: var(--surf-card-control-layer);
|
|
123
129
|
}
|
|
124
130
|
.surf-card-description {
|
|
125
131
|
margin: 0;
|
package/presentation/table.css
CHANGED
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
--surf-table-edge-start: 0px;
|
|
95
95
|
--surf-table-edge-end: 0px;
|
|
96
96
|
--surf-table-edge-top: 1px;
|
|
97
|
-
--surf-table-edge-bottom: 1px;
|
|
97
|
+
--surf-table-edge-bottom: var(--surf-table-run-edge-bottom, 1px);
|
|
98
98
|
background-color: var(--surf-selected);
|
|
99
99
|
box-shadow:
|
|
100
100
|
inset 0 var(--surf-table-edge-top) var(--surf-selected-edge),
|
|
@@ -202,11 +202,16 @@
|
|
|
202
202
|
> * {
|
|
203
203
|
--surf-table-edge-top: 0px;
|
|
204
204
|
}
|
|
205
|
+
/* The row, not its cells, asks what follows it, and its cells read the answer:
|
|
206
|
+
a :has() with cells after it would restyle every cell on the page whenever
|
|
207
|
+
anything inside a :has() ancestor changed, such as a chart redrawing. */
|
|
208
|
+
.surf-table-body > .surf-table-row[data-selected] {
|
|
209
|
+
--surf-table-run-edge-bottom: 1px;
|
|
210
|
+
}
|
|
205
211
|
.surf-table[data-variant]
|
|
206
212
|
> .surf-table-body
|
|
207
|
-
> .surf-table-row[data-selected]:has(+ .surf-table-row[data-selected])
|
|
208
|
-
|
|
209
|
-
--surf-table-edge-bottom: 0px;
|
|
213
|
+
> .surf-table-row[data-selected]:has(+ .surf-table-row[data-selected]) {
|
|
214
|
+
--surf-table-run-edge-bottom: 0px;
|
|
210
215
|
}
|
|
211
216
|
/* A bleeding container hangs by the cell inset, which density and size set; it
|
|
212
217
|
outranks the scroll root's own width cap. */
|
|
@@ -296,29 +301,44 @@
|
|
|
296
301
|
z-index: 3;
|
|
297
302
|
}
|
|
298
303
|
/* When the first header cell spans the header's rows, the first cell of a lower
|
|
299
|
-
header row is a data column's: it scrolls with the rest.
|
|
304
|
+
header row is a data column's: it scrolls with the rest. The table asks, and
|
|
305
|
+
those cells read the answer, as a selected row's cells do. Each table starts
|
|
306
|
+
unanswered, so a table inside a cell asks for itself. */
|
|
307
|
+
.surf-table {
|
|
308
|
+
--surf-table-spanned-inset: initial;
|
|
309
|
+
--surf-table-spanned-layer: initial;
|
|
310
|
+
--surf-table-spanned-edge: initial;
|
|
311
|
+
}
|
|
300
312
|
.surf-table[data-sticky-column]:has(
|
|
301
313
|
> .surf-table-head
|
|
302
314
|
> .surf-table-row:first-child
|
|
303
315
|
> :first-child[rowspan]:not([rowspan='1'])
|
|
304
|
-
)
|
|
316
|
+
) {
|
|
317
|
+
--surf-table-spanned-inset: auto;
|
|
318
|
+
--surf-table-spanned-layer: 2;
|
|
319
|
+
--surf-table-spanned-edge: none;
|
|
320
|
+
}
|
|
321
|
+
.surf-table[data-sticky-column]
|
|
305
322
|
> .surf-table-head
|
|
306
323
|
> .surf-table-row
|
|
307
324
|
+ .surf-table-row
|
|
308
325
|
> :first-child {
|
|
309
|
-
inset-inline-start:
|
|
310
|
-
z-index:
|
|
326
|
+
inset-inline-start: var(--surf-table-spanned-inset, 0);
|
|
327
|
+
z-index: var(--surf-table-spanned-layer, 1);
|
|
311
328
|
}
|
|
312
|
-
.surf-table[data-sticky-column]
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
329
|
+
.surf-table[data-sticky-column][data-sticky-header]
|
|
330
|
+
> .surf-table-head
|
|
331
|
+
> .surf-table-row
|
|
332
|
+
+ .surf-table-row
|
|
333
|
+
> :first-child {
|
|
334
|
+
z-index: var(--surf-table-spanned-layer, 3);
|
|
335
|
+
}
|
|
336
|
+
.surf-table[data-sticky-column]
|
|
317
337
|
> .surf-table-head
|
|
318
338
|
> .surf-table-row
|
|
319
339
|
+ .surf-table-row
|
|
320
340
|
> :first-child::after {
|
|
321
|
-
display:
|
|
341
|
+
display: var(--surf-table-spanned-edge, inline);
|
|
322
342
|
}
|
|
323
343
|
/* Once rows pass under the column, a line marks its edge. */
|
|
324
344
|
.surf-table[data-sticky-column]
|