@grafctory/skin 0.3.2 → 0.4.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/README.md +19 -0
- package/dist/index.css +22 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -470,6 +470,25 @@ still finds and reads it, where the native `hidden` attribute would remove it fo
|
|
|
470
470
|
<p role="status" data-offscreen>Card moved to Done.</p>
|
|
471
471
|
```
|
|
472
472
|
|
|
473
|
+
## Clipped Content
|
|
474
|
+
|
|
475
|
+
A value too long for the room it is given is cut short with `data-clipped`. The element keeps to one line and ends in
|
|
476
|
+
an ellipsis, so a reader can tell at a glance that there is more to it than what is shown. The box draws the ellipsis,
|
|
477
|
+
so a link inside it is cut as plain text is. The cut falls at the edge of the box, which is what a cell set flush
|
|
478
|
+
against the next one needs.
|
|
479
|
+
|
|
480
|
+
```html
|
|
481
|
+
<td data-clipped>Annual report on teaching and learning</td>
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
A box with room around it clips `bleed` instead. The clip then stands clear of the box, so the focus mark of a link
|
|
485
|
+
inside shows whole while the ellipsis still cuts at the edge. Give it only where that room exists, or a glyph is
|
|
486
|
+
painted over whatever the box stands against.
|
|
487
|
+
|
|
488
|
+
```html
|
|
489
|
+
<dd data-clipped="bleed"><a href="https://example.com/a/long/address">https://example.com/a/long/address</a></dd>
|
|
490
|
+
```
|
|
491
|
+
|
|
473
492
|
# Support
|
|
474
493
|
|
|
475
494
|
- open an [issue](https://github.com/grafctory/skin/issues) to report a problem or to suggest a new feature
|
package/dist/index.css
CHANGED
|
@@ -84,7 +84,6 @@
|
|
|
84
84
|
* The root keeps the size the reader set, so a rem means that setting wherever it is read, as it does in a media
|
|
85
85
|
* query. The base size stated against it then resolves to one length at every depth, and the page takes it here.
|
|
86
86
|
*/
|
|
87
|
-
|
|
88
87
|
body {
|
|
89
88
|
font-size: var(--skin--font-size);
|
|
90
89
|
}
|
|
@@ -95,7 +94,6 @@
|
|
|
95
94
|
* pins a scheme is not left with the colours of the page around it. The page colours are restated there too,
|
|
96
95
|
* since the island would otherwise inherit them as the root resolved them.
|
|
97
96
|
*/
|
|
98
|
-
|
|
99
97
|
[data-scheme="light"] {
|
|
100
98
|
color-scheme: light;
|
|
101
99
|
}
|
|
@@ -114,7 +112,6 @@
|
|
|
114
112
|
* tree, for text only a screen reader needs, as a status region or the name of a control shown as an icon.
|
|
115
113
|
* Clipping keeps it from opening a scrollbar, and the unwrapped line keeps its words read out as one run.
|
|
116
114
|
*/
|
|
117
|
-
|
|
118
115
|
[data-offscreen] {
|
|
119
116
|
position: absolute;
|
|
120
117
|
width: 1px;
|
|
@@ -127,4 +124,26 @@
|
|
|
127
124
|
border: 0;
|
|
128
125
|
}
|
|
129
126
|
|
|
127
|
+
/*
|
|
128
|
+
* An element marked data-clipped keeps to one line and is cut short with an ellipsis where its content outruns
|
|
129
|
+
* it, so a reader can tell there is more to a value than what is shown. The ellipsis is drawn by the box rather
|
|
130
|
+
* than by what it holds, since no inline element cuts itself, so marking the box cuts a link and a plain run of
|
|
131
|
+
* text alike. The cut falls at the edge of the box, so a box set flush against its neighbour, as a table cell is,
|
|
132
|
+
* paints nothing over it.
|
|
133
|
+
*/
|
|
134
|
+
[data-clipped] {
|
|
135
|
+
overflow: clip;
|
|
136
|
+
text-overflow: ellipsis;
|
|
137
|
+
white-space: nowrap;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/*
|
|
141
|
+
* Where a box has room around it, the clip stands clear of it, so the focus mark of a link inside shows whole
|
|
142
|
+
* while the ellipsis still cuts at the edge. The room is the caller's to give: short of it, the mark shows at
|
|
143
|
+
* the price of a glyph painted over whatever the box stands against.
|
|
144
|
+
*/
|
|
145
|
+
[data-clipped="bleed"] {
|
|
146
|
+
overflow-clip-margin: var(--skin--spacing-050);
|
|
147
|
+
}
|
|
148
|
+
|
|
130
149
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafctory/skin",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Essential design tokens and styles.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"@csstools/css-color-parser": "^4.2.7",
|
|
77
77
|
"@csstools/css-parser-algorithms": "^4.0.2",
|
|
78
78
|
"@csstools/css-tokenizer": "^4.0.2",
|
|
79
|
-
"@grafctory/rack": "^0.8.
|
|
79
|
+
"@grafctory/rack": "^0.8.3",
|
|
80
80
|
"@types/node": "^22.20.4",
|
|
81
81
|
"typedoc": "^0.28.20",
|
|
82
82
|
"typescript": "^6.0.3",
|