@nxgt/material 3.7.2 → 3.7.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @nxgt/material
2
2
 
3
+ ## 3.7.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1386](https://github.com/softistx/nxgt-material/pull/1386) [`ae0bd15`](https://github.com/softistx/nxgt-material/commit/ae0bd15881ad0d4e81bedb314e50bb3ac7d732e7) Thanks [@SteveGT96](https://github.com/SteveGT96)! - `ActivityLayout` with a `backdrop`: the chrome is now lightly translucent and frosted instead of opaque, so a shape shows faintly behind the app bar, the breadcrumb and the tabs strip. The app bar is 80% of `--background`; the sidebar, the breadcrumb and the tabs strip are 87% (the least that keeps their text at WCAG AA over the darkest shape in the light theme); all sit over a 6px blur. Under `prefers-reduced-transparency: reduce`, or where `backdrop-filter` is unsupported, the blur is off and the fill is 92%. `--nxgt-backdrop-chrome` still overrides the fill, `--nxgt-backdrop-surface` and the lists, tables and cards stay opaque, and nothing changes without a `backdrop`.
8
+
9
+ ## 3.7.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#1382](https://github.com/softistx/nxgt-material/pull/1382) [`c3be251`](https://github.com/softistx/nxgt-material/commit/c3be2515caaa2783167b7b1cac0183974ba9fc52) Thanks [@SteveGT96](https://github.com/SteveGT96)! - Fix the `ActivityLayout` `backdrop` scrolling along with the page. The layer is now `position: sticky` in the content column: as wide as the column, one viewport high, and it stays in the viewport while the content scrolls over it, in `scroll="document"` and `scroll="container"` alike. It still shows only inside the content column (not in the rail, the app bar's band or the gutters), and nothing changes without a `backdrop`.
14
+
3
15
  ## 3.7.2
4
16
 
5
17
  ### Patch Changes
@@ -9,13 +9,18 @@
9
9
  * frame's padding and gaps take the chrome fill, so the shapes show nowhere
10
10
  * else.
11
11
  *
12
- * The shapes show in the free content area only: every surface of the chrome and
13
- * of the lists is opaque, so none runs behind a text, an icon or a control. Two
14
- * tokens, set on the layout (or any ancestor), tune them:
12
+ * The chrome is lightly translucent and frosted: about 80% of the background
13
+ * colour (--nxgt-backdrop-chrome-alpha, the app bar) or 87% (--nxgt-backdrop-nav-alpha,
14
+ * the sidebar, the breadcrumb and the tabs strip, whose text needs it to keep
15
+ * WCAG AA over the darkest shape in the light theme) over a 6px blur
16
+ * (--nxgt-backdrop-blur), so a shape shows faintly behind them, too blurred to
17
+ * compete with a text. The lists, tables and cards stay opaque. Under `prefers-reduced-transparency:
18
+ * reduce`, or where `backdrop-filter` is unsupported, the blur is off and the
19
+ * fill is 92% (both). Two tokens, set on the layout (or any ancestor), tune them:
15
20
  * --nxgt-backdrop-chrome the sidebar, the app bar, the breadcrumb, the tabs
16
- * strip (default: var(--background))
21
+ * strip (default: the background at 80% / 92%)
17
22
  * --nxgt-backdrop-surface the lists and tables, their band and rows
18
- * (default: var(--card))
23
+ * (default: var(--card), opaque)
19
24
  * The sidebar, the app bar and the tables take theirs from a class whose
20
25
  * fallback is their usual surface, through `--nxgt-backdrop-fill-*`: a utility
21
26
  * class outranks any rule in a layer, so a rule here could not set them. */
@@ -35,11 +40,69 @@
35
40
  height: 100%;
36
41
  }
37
42
 
43
+ /* The layer is sticky, not absolute: it keeps the column's left and right
44
+ * edges and stays in the viewport, from the app bar's top to the frame's
45
+ * bottom padding, while the page (scroll="document") or the content region
46
+ * (scroll="container") scrolls over it. It is the column's first child, so
47
+ * a negative bottom margin (its height, and the column's 0.5rem gap) takes
48
+ * it out of the flow: the app bar keeps its place. The offsets are the
49
+ * frame's own padding and the app bar's sticky top. */
50
+ [data-slot="activity-layout-backdrop"] {
51
+ --nxgt-backdrop-top: max(0.5rem, env(safe-area-inset-top));
52
+ --nxgt-backdrop-height: calc(
53
+ 100dvh -
54
+ var(--nxgt-backdrop-top) -
55
+ max(0.5rem, env(safe-area-inset-bottom)) -
56
+ var(--nxgt-media-dock, 0px)
57
+ );
58
+ position: sticky;
59
+ top: var(--nxgt-backdrop-top);
60
+ height: var(--nxgt-backdrop-height);
61
+ margin-bottom: calc(-1 * var(--nxgt-backdrop-height) - 0.5rem);
62
+ }
63
+
38
64
  [data-slot="activity-layout"][data-backdrop] {
39
- --nxgt-backdrop-fill-chrome: var(--nxgt-backdrop-chrome, var(--background));
65
+ --nxgt-backdrop-chrome-alpha: 80%;
66
+ --nxgt-backdrop-nav-alpha: 87%;
67
+ --nxgt-backdrop-blur: 6px;
68
+ --nxgt-backdrop-fill-chrome: var(
69
+ --nxgt-backdrop-chrome,
70
+ color-mix(
71
+ in oklab,
72
+ var(--background) var(--nxgt-backdrop-chrome-alpha),
73
+ transparent
74
+ )
75
+ );
76
+ --nxgt-backdrop-fill-nav: var(
77
+ --nxgt-backdrop-chrome,
78
+ color-mix(
79
+ in oklab,
80
+ var(--background) var(--nxgt-backdrop-nav-alpha),
81
+ transparent
82
+ )
83
+ );
40
84
  --nxgt-backdrop-fill-surface: var(--nxgt-backdrop-surface, var(--card));
41
85
  }
42
86
 
87
+ /* No blur to lean on: a more opaque fill instead. */
88
+ @supports not (
89
+ (backdrop-filter: blur(1px)) or
90
+ (-webkit-backdrop-filter: blur(1px))
91
+ ) {
92
+ [data-slot="activity-layout"][data-backdrop] {
93
+ --nxgt-backdrop-chrome-alpha: 92%;
94
+ --nxgt-backdrop-nav-alpha: 92%;
95
+ --nxgt-backdrop-blur: 0px;
96
+ }
97
+ }
98
+ @media (prefers-reduced-transparency: reduce) {
99
+ [data-slot="activity-layout"][data-backdrop] {
100
+ --nxgt-backdrop-chrome-alpha: 92%;
101
+ --nxgt-backdrop-nav-alpha: 92%;
102
+ --nxgt-backdrop-blur: 0px;
103
+ }
104
+ }
105
+
43
106
  /* The breadcrumb trail: a pill under the app bar, as wide as its crumbs. */
44
107
  [data-slot="activity-layout"][data-backdrop]
45
108
  [data-slot="activity-layout-frame"]
@@ -50,7 +113,9 @@
50
113
  padding-block: 0.25rem;
51
114
  padding-inline-end: 0.75rem;
52
115
  border-radius: 999px;
53
- background: var(--nxgt-backdrop-fill-chrome);
116
+ background: var(--nxgt-backdrop-fill-nav);
117
+ -webkit-backdrop-filter: blur(var(--nxgt-backdrop-blur));
118
+ backdrop-filter: blur(var(--nxgt-backdrop-blur));
54
119
  }
55
120
 
56
121
  /* Tabs: the strip is a band, its top corners rounded. (The segmented look
@@ -58,6 +123,8 @@
58
123
  [data-slot="activity-layout"][data-backdrop] [data-slot="tabs-list"] {
59
124
  border-start-start-radius: var(--radius);
60
125
  border-start-end-radius: var(--radius);
61
- background: var(--nxgt-backdrop-fill-chrome);
126
+ background: var(--nxgt-backdrop-fill-nav);
127
+ -webkit-backdrop-filter: blur(var(--nxgt-backdrop-blur));
128
+ backdrop-filter: blur(var(--nxgt-backdrop-blur));
62
129
  }
63
130
  }