@devslab/dds-css 0.11.0 → 0.11.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/dist/components/table.css +75 -0
- package/dist/dds.css +75 -0
- package/package.json +1 -1
|
@@ -55,6 +55,15 @@
|
|
|
55
55
|
font-variant-numeric: tabular-nums;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
/* Code cells: ids, keys and hashes are read character by character, so a
|
|
59
|
+
* <code> inside a cell takes the mono family at 13px — a notch under the
|
|
60
|
+
* 14px cell text, which is the size mono needs to sit at the same visual
|
|
61
|
+
* weight as the sans around it. */
|
|
62
|
+
.dds-table code {
|
|
63
|
+
font-family: var(--dds-font-family-mono);
|
|
64
|
+
font-size: .8125rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
58
67
|
.dds-table th small {
|
|
59
68
|
display: block;
|
|
60
69
|
color: var(--dds-color-text-muted);
|
|
@@ -80,6 +89,17 @@
|
|
|
80
89
|
background: var(--dds-color-bg-elevated);
|
|
81
90
|
}
|
|
82
91
|
|
|
92
|
+
/* Separate borders under the sticky header: with border-collapse: collapse
|
|
93
|
+
* the cell borders belong to the table rather than the cells, and that can
|
|
94
|
+
* keep a sticky header from actually sticking when the wrap scrolls (the
|
|
95
|
+
* header row slides away, or its border stays behind). Every cell border
|
|
96
|
+
* here is block-start only, so separate borders with zero spacing draw the
|
|
97
|
+
* same lines. */
|
|
98
|
+
.dds-table-wrap--tall .dds-table {
|
|
99
|
+
border-collapse: separate;
|
|
100
|
+
border-spacing: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
83
103
|
.dds-table__sort {
|
|
84
104
|
appearance: none;
|
|
85
105
|
display: inline-flex;
|
|
@@ -128,6 +148,61 @@
|
|
|
128
148
|
display: none;
|
|
129
149
|
}
|
|
130
150
|
|
|
151
|
+
/* Row actions are 32px and stay on one line. A button's own geometry (40px
|
|
152
|
+
* default, 32px --sm, both with wrapping labels) plus the cell's 10px block
|
|
153
|
+
* padding made a row carrying a button measure ~53px against its 40px
|
|
154
|
+
* neighbours — a table whose rows are not one height reads as broken. So an
|
|
155
|
+
* action button is held to the --sm height whatever its size modifier
|
|
156
|
+
* (padding included, or a default button would still be 34px), its label
|
|
157
|
+
* never wraps (the wrap scrolls horizontally, nothing is clipped), and the
|
|
158
|
+
* actions cell trims its block padding so 32px fits inside the 40px row. */
|
|
159
|
+
.dds-table__actions .dds-btn {
|
|
160
|
+
min-block-size: var(--dds-space-32);
|
|
161
|
+
padding-block: var(--dds-space-4);
|
|
162
|
+
white-space: nowrap;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* The same trim for any cell holding a small button (a copy button beside
|
|
166
|
+
* an id): its own 10px padding around a 32px button is a 53px row, and even
|
|
167
|
+
* in a dense table 6px around a 24px button plus the 1px border is 37px, a
|
|
168
|
+
* pixel over the 36px row. A default-size button outside the actions cell
|
|
169
|
+
* keeps full padding — that is an explicit choice to be taller. */
|
|
170
|
+
.dds-table td:has(> .dds-table__actions),
|
|
171
|
+
.dds-table td:has(.dds-btn--sm) {
|
|
172
|
+
padding-block: var(--dds-space-4);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/* Small buttons in a dense table are 24px — a copy button beside an id in
|
|
176
|
+
* any cell, and every row action whatever its size modifier (the same
|
|
177
|
+
* "whatever its modifier" as the 32px rule above, one density down) — so
|
|
178
|
+
* they fit the 36px dense row. Zero block padding is what gets there:
|
|
179
|
+
* --sm's own 4px padding around a 16px label already makes 26px, which
|
|
180
|
+
* min-block-size can't pull back down. 24px is exactly the §6 web floor.
|
|
181
|
+
* A default-size button outside the actions cell is left alone: that is an
|
|
182
|
+
* explicit choice to be taller. The actions selector out-specifies the
|
|
183
|
+
* 32px rule; the --sm one ties it and wins on source order. Middle
|
|
184
|
+
* alignment keeps an inline button beside text from growing the line box
|
|
185
|
+
* past its own 24px by sitting on the text baseline. */
|
|
186
|
+
.dds-table--dense .dds-btn--sm,
|
|
187
|
+
.dds-table--dense .dds-table__actions .dds-btn {
|
|
188
|
+
min-block-size: var(--dds-space-24);
|
|
189
|
+
padding-block: 0;
|
|
190
|
+
vertical-align: middle;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/* Touch pointers keep the 44px floor (spec §6, button.css). The two rules
|
|
194
|
+
* above out-specify button.css's coarse-pointer rule, so without restating
|
|
195
|
+
* it here a table would silently shrink every action below the touch
|
|
196
|
+
* target on a phone. Uniform row height yields on touch; the target does
|
|
197
|
+
* not (docs/decisions.md D-025). */
|
|
198
|
+
@media (pointer: coarse) {
|
|
199
|
+
.dds-table__actions .dds-btn,
|
|
200
|
+
.dds-table--dense .dds-btn--sm,
|
|
201
|
+
.dds-table--dense .dds-table__actions .dds-btn {
|
|
202
|
+
min-block-size: 44px;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
131
206
|
.dds-table__order {
|
|
132
207
|
margin: 0 0 var(--dds-space-8);
|
|
133
208
|
font-size: .8125rem;
|
package/dist/dds.css
CHANGED
|
@@ -1280,6 +1280,15 @@ dialog.dds-dialog::backdrop {
|
|
|
1280
1280
|
font-variant-numeric: tabular-nums;
|
|
1281
1281
|
}
|
|
1282
1282
|
|
|
1283
|
+
/* Code cells: ids, keys and hashes are read character by character, so a
|
|
1284
|
+
* <code> inside a cell takes the mono family at 13px — a notch under the
|
|
1285
|
+
* 14px cell text, which is the size mono needs to sit at the same visual
|
|
1286
|
+
* weight as the sans around it. */
|
|
1287
|
+
.dds-table code {
|
|
1288
|
+
font-family: var(--dds-font-family-mono);
|
|
1289
|
+
font-size: .8125rem;
|
|
1290
|
+
}
|
|
1291
|
+
|
|
1283
1292
|
.dds-table th small {
|
|
1284
1293
|
display: block;
|
|
1285
1294
|
color: var(--dds-color-text-muted);
|
|
@@ -1305,6 +1314,17 @@ dialog.dds-dialog::backdrop {
|
|
|
1305
1314
|
background: var(--dds-color-bg-elevated);
|
|
1306
1315
|
}
|
|
1307
1316
|
|
|
1317
|
+
/* Separate borders under the sticky header: with border-collapse: collapse
|
|
1318
|
+
* the cell borders belong to the table rather than the cells, and that can
|
|
1319
|
+
* keep a sticky header from actually sticking when the wrap scrolls (the
|
|
1320
|
+
* header row slides away, or its border stays behind). Every cell border
|
|
1321
|
+
* here is block-start only, so separate borders with zero spacing draw the
|
|
1322
|
+
* same lines. */
|
|
1323
|
+
.dds-table-wrap--tall .dds-table {
|
|
1324
|
+
border-collapse: separate;
|
|
1325
|
+
border-spacing: 0;
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1308
1328
|
.dds-table__sort {
|
|
1309
1329
|
appearance: none;
|
|
1310
1330
|
display: inline-flex;
|
|
@@ -1353,6 +1373,61 @@ dialog.dds-dialog::backdrop {
|
|
|
1353
1373
|
display: none;
|
|
1354
1374
|
}
|
|
1355
1375
|
|
|
1376
|
+
/* Row actions are 32px and stay on one line. A button's own geometry (40px
|
|
1377
|
+
* default, 32px --sm, both with wrapping labels) plus the cell's 10px block
|
|
1378
|
+
* padding made a row carrying a button measure ~53px against its 40px
|
|
1379
|
+
* neighbours — a table whose rows are not one height reads as broken. So an
|
|
1380
|
+
* action button is held to the --sm height whatever its size modifier
|
|
1381
|
+
* (padding included, or a default button would still be 34px), its label
|
|
1382
|
+
* never wraps (the wrap scrolls horizontally, nothing is clipped), and the
|
|
1383
|
+
* actions cell trims its block padding so 32px fits inside the 40px row. */
|
|
1384
|
+
.dds-table__actions .dds-btn {
|
|
1385
|
+
min-block-size: var(--dds-space-32);
|
|
1386
|
+
padding-block: var(--dds-space-4);
|
|
1387
|
+
white-space: nowrap;
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
/* The same trim for any cell holding a small button (a copy button beside
|
|
1391
|
+
* an id): its own 10px padding around a 32px button is a 53px row, and even
|
|
1392
|
+
* in a dense table 6px around a 24px button plus the 1px border is 37px, a
|
|
1393
|
+
* pixel over the 36px row. A default-size button outside the actions cell
|
|
1394
|
+
* keeps full padding — that is an explicit choice to be taller. */
|
|
1395
|
+
.dds-table td:has(> .dds-table__actions),
|
|
1396
|
+
.dds-table td:has(.dds-btn--sm) {
|
|
1397
|
+
padding-block: var(--dds-space-4);
|
|
1398
|
+
}
|
|
1399
|
+
|
|
1400
|
+
/* Small buttons in a dense table are 24px — a copy button beside an id in
|
|
1401
|
+
* any cell, and every row action whatever its size modifier (the same
|
|
1402
|
+
* "whatever its modifier" as the 32px rule above, one density down) — so
|
|
1403
|
+
* they fit the 36px dense row. Zero block padding is what gets there:
|
|
1404
|
+
* --sm's own 4px padding around a 16px label already makes 26px, which
|
|
1405
|
+
* min-block-size can't pull back down. 24px is exactly the §6 web floor.
|
|
1406
|
+
* A default-size button outside the actions cell is left alone: that is an
|
|
1407
|
+
* explicit choice to be taller. The actions selector out-specifies the
|
|
1408
|
+
* 32px rule; the --sm one ties it and wins on source order. Middle
|
|
1409
|
+
* alignment keeps an inline button beside text from growing the line box
|
|
1410
|
+
* past its own 24px by sitting on the text baseline. */
|
|
1411
|
+
.dds-table--dense .dds-btn--sm,
|
|
1412
|
+
.dds-table--dense .dds-table__actions .dds-btn {
|
|
1413
|
+
min-block-size: var(--dds-space-24);
|
|
1414
|
+
padding-block: 0;
|
|
1415
|
+
vertical-align: middle;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
/* Touch pointers keep the 44px floor (spec §6, button.css). The two rules
|
|
1419
|
+
* above out-specify button.css's coarse-pointer rule, so without restating
|
|
1420
|
+
* it here a table would silently shrink every action below the touch
|
|
1421
|
+
* target on a phone. Uniform row height yields on touch; the target does
|
|
1422
|
+
* not (docs/decisions.md D-025). */
|
|
1423
|
+
@media (pointer: coarse) {
|
|
1424
|
+
.dds-table__actions .dds-btn,
|
|
1425
|
+
.dds-table--dense .dds-btn--sm,
|
|
1426
|
+
.dds-table--dense .dds-table__actions .dds-btn {
|
|
1427
|
+
min-block-size: 44px;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1356
1431
|
.dds-table__order {
|
|
1357
1432
|
margin: 0 0 var(--dds-space-8);
|
|
1358
1433
|
font-size: .8125rem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devslab/dds-css",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"description": "DDS CSS component layer — class-based, framework-neutral, semantic-token-only (spec §4.3 v1 inventory, 20 components)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|