@nxgt/material 3.7.3 → 3.7.5

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.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1389](https://github.com/softistx/nxgt-material/pull/1389) [`75789b7`](https://github.com/softistx/nxgt-material/commit/75789b79c2a3c90c0febbde8c6ed17a52b376695) Thanks [@SteveGT96](https://github.com/SteveGT96)! - fix(app-shell): `ActivityLayout` with `scroll="document"` no longer lets the page scroll into the 8px gutter above the sticky app bar. A fixed gutter mask with the app bar's own fill (the chrome fill under a `backdrop`, the usual translucent background without one) covers the strip; at scroll top the layout looks as before.
8
+
9
+ ## 3.7.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [#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`.
14
+
3
15
  ## 3.7.3
4
16
 
5
17
  ### Patch Changes
@@ -9,21 +9,61 @@
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. */
22
27
  @layer components {
28
+ /* The gutter mask without a backdrop (activity-layout.tsx) has the app bar's
29
+ * translucent fill, which the page's top gutter never had: it fades in over
30
+ * the first 8px of scroll, so at scroll top nothing changed. A browser
31
+ * without scroll-driven animations shows it from the start. */
32
+ @keyframes nxgt-gutter-in {
33
+ from {
34
+ opacity: 0;
35
+ }
36
+ to {
37
+ opacity: 1;
38
+ }
39
+ }
40
+ @supports (animation-timeline: scroll()) {
41
+ [data-slot="activity-layout"]:not([data-backdrop])
42
+ [data-slot="activity-layout-gutter"] {
43
+ animation: nxgt-gutter-in linear both;
44
+ animation-timeline: scroll(root block);
45
+ animation-range: 0px 8px;
46
+ }
47
+ }
48
+
23
49
  /* The gradient's own tint and blobs give way to the backdrop. */
24
50
  [data-slot="activity-layout"][data-backdrop] {
25
51
  background-image: none;
26
52
  }
53
+
54
+ /* scroll="document": the frame's chrome fill leaves its top gutter to the
55
+ * gutter mask (activity-layout.tsx), a fixed strip with the same fill that
56
+ * hides the scrolled page above the sticky app bar. Painting both would
57
+ * stack two translucent fills there. */
58
+ [data-slot="activity-layout"][data-backdrop][data-scroll="document"]
59
+ [data-slot="activity-layout-frame"] {
60
+ background:
61
+ linear-gradient(
62
+ var(--nxgt-backdrop-fill-chrome),
63
+ var(--nxgt-backdrop-fill-chrome)
64
+ )
65
+ bottom / 100% calc(100% - var(--nxgt-backdrop-top)) no-repeat;
66
+ }
27
67
  [data-slot="activity-layout"][data-backdrop] > [data-layer] {
28
68
  display: none;
29
69
  }
@@ -43,7 +83,6 @@
43
83
  * it out of the flow: the app bar keeps its place. The offsets are the
44
84
  * frame's own padding and the app bar's sticky top. */
45
85
  [data-slot="activity-layout-backdrop"] {
46
- --nxgt-backdrop-top: max(0.5rem, env(safe-area-inset-top));
47
86
  --nxgt-backdrop-height: calc(
48
87
  100dvh -
49
88
  var(--nxgt-backdrop-top) -
@@ -57,10 +96,48 @@
57
96
  }
58
97
 
59
98
  [data-slot="activity-layout"][data-backdrop] {
60
- --nxgt-backdrop-fill-chrome: var(--nxgt-backdrop-chrome, var(--background));
99
+ --nxgt-backdrop-top: max(0.5rem, env(safe-area-inset-top));
100
+ --nxgt-backdrop-chrome-alpha: 80%;
101
+ --nxgt-backdrop-nav-alpha: 87%;
102
+ --nxgt-backdrop-blur: 6px;
103
+ --nxgt-backdrop-fill-chrome: var(
104
+ --nxgt-backdrop-chrome,
105
+ color-mix(
106
+ in oklab,
107
+ var(--background) var(--nxgt-backdrop-chrome-alpha),
108
+ transparent
109
+ )
110
+ );
111
+ --nxgt-backdrop-fill-nav: var(
112
+ --nxgt-backdrop-chrome,
113
+ color-mix(
114
+ in oklab,
115
+ var(--background) var(--nxgt-backdrop-nav-alpha),
116
+ transparent
117
+ )
118
+ );
61
119
  --nxgt-backdrop-fill-surface: var(--nxgt-backdrop-surface, var(--card));
62
120
  }
63
121
 
122
+ /* No blur to lean on: a more opaque fill instead. */
123
+ @supports not (
124
+ (backdrop-filter: blur(1px)) or
125
+ (-webkit-backdrop-filter: blur(1px))
126
+ ) {
127
+ [data-slot="activity-layout"][data-backdrop] {
128
+ --nxgt-backdrop-chrome-alpha: 92%;
129
+ --nxgt-backdrop-nav-alpha: 92%;
130
+ --nxgt-backdrop-blur: 0px;
131
+ }
132
+ }
133
+ @media (prefers-reduced-transparency: reduce) {
134
+ [data-slot="activity-layout"][data-backdrop] {
135
+ --nxgt-backdrop-chrome-alpha: 92%;
136
+ --nxgt-backdrop-nav-alpha: 92%;
137
+ --nxgt-backdrop-blur: 0px;
138
+ }
139
+ }
140
+
64
141
  /* The breadcrumb trail: a pill under the app bar, as wide as its crumbs. */
65
142
  [data-slot="activity-layout"][data-backdrop]
66
143
  [data-slot="activity-layout-frame"]
@@ -71,7 +148,9 @@
71
148
  padding-block: 0.25rem;
72
149
  padding-inline-end: 0.75rem;
73
150
  border-radius: 999px;
74
- background: var(--nxgt-backdrop-fill-chrome);
151
+ background: var(--nxgt-backdrop-fill-nav);
152
+ -webkit-backdrop-filter: blur(var(--nxgt-backdrop-blur));
153
+ backdrop-filter: blur(var(--nxgt-backdrop-blur));
75
154
  }
76
155
 
77
156
  /* Tabs: the strip is a band, its top corners rounded. (The segmented look
@@ -79,6 +158,8 @@
79
158
  [data-slot="activity-layout"][data-backdrop] [data-slot="tabs-list"] {
80
159
  border-start-start-radius: var(--radius);
81
160
  border-start-end-radius: var(--radius);
82
- background: var(--nxgt-backdrop-fill-chrome);
161
+ background: var(--nxgt-backdrop-fill-nav);
162
+ -webkit-backdrop-filter: blur(var(--nxgt-backdrop-blur));
163
+ backdrop-filter: blur(var(--nxgt-backdrop-blur));
83
164
  }
84
165
  }