@canonical/styles 0.27.1-experimental.0 → 0.28.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/package.json +4 -4
- package/src/index.css +3 -0
- package/src/overflow.css +31 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canonical/styles",
|
|
3
3
|
"description": "Canonical Design System global stylesheet. Aggregates normalize, typography, and design tokens.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.28.0",
|
|
5
5
|
"main": "src/index.css",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": "./src/index.css",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@biomejs/biome": "2.4.9",
|
|
33
|
-
"@canonical/biome-config": "^0.
|
|
33
|
+
"@canonical/biome-config": "^0.28.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@canonical/design-tokens": "^0.6.0",
|
|
37
|
-
"@canonical/styles-typography": "^0.
|
|
37
|
+
"@canonical/styles-typography": "^0.28.0",
|
|
38
38
|
"normalize.css": "^8.0.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"optional": true
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "8297d72122bcba903f7e8833cb23ccbaa164ed56"
|
|
49
49
|
}
|
package/src/index.css
CHANGED
package/src/overflow.css
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* @canonical/styles — Scroll overflow affordance tokens
|
|
2
|
+
*
|
|
3
|
+
* Provides a "fade" gradient used at the scrollable edge of a container (e.g.
|
|
4
|
+
* the main navigation list) to hint that more content lies beyond.
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* - Paint `--surface-overflow-gradient` over the bottom edge of a scroll
|
|
8
|
+
* container (e.g. a sticky/absolute ::after of height
|
|
9
|
+
* `--overflow-gradient-height`).
|
|
10
|
+
* - The container MUST reserve bottom padding (or an equivalent flex gap) of
|
|
11
|
+
* at least `--overflow-gradient-height`, so the last item isn't permanently
|
|
12
|
+
* obscured behind the fade.
|
|
13
|
+
*
|
|
14
|
+
* TODO: promote `--overflow-gradient-height` to a real semantic token in
|
|
15
|
+
* @canonical/design-tokens (currently hard-coded here, like the spacing scale).
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
:root {
|
|
19
|
+
/* Height of the overflow fade. Defaults to 2rem. */
|
|
20
|
+
--overflow-gradient-height: 2rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.surface {
|
|
24
|
+
/* Fades from transparent to the current surface background, so it adapts to
|
|
25
|
+
whichever layer (.surface nesting) it paints over. */
|
|
26
|
+
--surface-overflow-gradient: linear-gradient(
|
|
27
|
+
to bottom,
|
|
28
|
+
transparent,
|
|
29
|
+
var(--surface-color-background)
|
|
30
|
+
);
|
|
31
|
+
}
|