@passui/tokens 0.2.0 → 0.2.2
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 +1 -1
- package/styles/base.css +39 -3
package/package.json
CHANGED
package/styles/base.css
CHANGED
|
@@ -18,9 +18,11 @@
|
|
|
18
18
|
|
|
19
19
|
html {
|
|
20
20
|
@apply font-sans;
|
|
21
|
-
/* The colour behind the page: what shows
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
/* The colour behind the page: what shows past either edge, and what
|
|
22
|
+
iOS Safari's floating bars sample. It is the page colour, so nothing
|
|
23
|
+
foreign ever shows under a bar; where scroll timelines exist it
|
|
24
|
+
follows the scroll (see the end of this file). */
|
|
25
|
+
background-color: var(--color-background);
|
|
24
26
|
height: 100%;
|
|
25
27
|
-webkit-font-smoothing: antialiased;
|
|
26
28
|
-moz-osx-font-smoothing: grayscale;
|
|
@@ -148,3 +150,37 @@
|
|
|
148
150
|
) {
|
|
149
151
|
font-size: max(16px, 1em);
|
|
150
152
|
}
|
|
153
|
+
|
|
154
|
+
/*
|
|
155
|
+
* iOS Safari tints its floating toolbar from whatever sits flush against the
|
|
156
|
+
* bottom edge, so a full-screen backdrop shows the page colour in the bar
|
|
157
|
+
* instead of its dimming. Lifting the backdrops a few pixels off the edge
|
|
158
|
+
* lets the toolbar sample the dimmed page behind them.
|
|
159
|
+
*/
|
|
160
|
+
:root[data-os="ios"] [data-slot$="-overlay"] {
|
|
161
|
+
bottom: var(--ios-edge-gap, 4px);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/*
|
|
165
|
+
* The colour behind the page follows the scroll: `--overscroll-color` (an
|
|
166
|
+
* app's bar colour) at the top, the page colour at the bottom. Pulling past
|
|
167
|
+
* the top shows the bar's colour, and the area under Safari's floating
|
|
168
|
+
* bottom bar is always the page colour. The animation clamps at both ends,
|
|
169
|
+
* so rubber-banding shows each end's colour. A page too short to scroll
|
|
170
|
+
* has no timeline and keeps the plain page colour.
|
|
171
|
+
*/
|
|
172
|
+
@keyframes passui-backdrop {
|
|
173
|
+
from {
|
|
174
|
+
background-color: var(--overscroll-color, var(--color-background));
|
|
175
|
+
}
|
|
176
|
+
to {
|
|
177
|
+
background-color: var(--color-background);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@supports (animation-timeline: scroll()) {
|
|
182
|
+
html {
|
|
183
|
+
animation: passui-backdrop linear both;
|
|
184
|
+
animation-timeline: scroll(root block);
|
|
185
|
+
}
|
|
186
|
+
}
|