@passui/tokens 0.1.6 → 0.2.1

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@passui/tokens",
3
- "version": "0.1.6",
3
+ "version": "0.2.1",
4
4
  "description": "Framework independent Passui design tokens and shared styles.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/styles/base.css CHANGED
@@ -18,6 +18,9 @@
18
18
 
19
19
  html {
20
20
  @apply font-sans;
21
+ /* The colour behind the page: what shows when iOS rubber-bands past
22
+ either edge. Apps point `--overscroll-color` at their bar colour. */
23
+ background-color: var(--overscroll-color, var(--color-background));
21
24
  height: 100%;
22
25
  -webkit-font-smoothing: antialiased;
23
26
  -moz-osx-font-smoothing: grayscale;
@@ -132,3 +135,26 @@
132
135
  animation-iteration-count: 1 !important;
133
136
  }
134
137
  }
138
+
139
+ /*
140
+ * iOS Safari zooms the page when a field under 16px takes focus. This sits
141
+ * outside the base layer so it beats the component type utilities.
142
+ */
143
+ :root[data-os="ios"]
144
+ :is(
145
+ input:not([type="checkbox"], [type="radio"], [type="range"]),
146
+ select,
147
+ textarea
148
+ ) {
149
+ font-size: max(16px, 1em);
150
+ }
151
+
152
+ /*
153
+ * iOS Safari tints its floating toolbar from whatever sits flush against the
154
+ * bottom edge, so a full-screen backdrop shows the page colour in the bar
155
+ * instead of its dimming. Lifting the backdrops a few pixels off the edge
156
+ * lets the toolbar sample the dimmed page behind them.
157
+ */
158
+ :root[data-os="ios"] [data-slot$="-overlay"] {
159
+ bottom: var(--ios-edge-gap, 4px);
160
+ }
@@ -207,6 +207,22 @@
207
207
  backdrop-filter: none;
208
208
  }
209
209
 
210
+ /* iOS Safari samples a sticky bar's backdrop while the toolbar collapses and
211
+ the page rubber-bands, so a blurred bar flickers and shows the wrong colour
212
+ at the edges. Bars and panes are solid there, on their own GPU layer. */
213
+ :root[data-os="ios"] :is(.glass-bar, .glass-pane) {
214
+ backdrop-filter: none;
215
+ transform: translateZ(0);
216
+ }
217
+
218
+ :root[data-os="ios"] .glass-bar {
219
+ background-color: var(--color-paper);
220
+ }
221
+
222
+ :root[data-os="ios"] .glass-pane {
223
+ background-color: var(--color-sidebar);
224
+ }
225
+
210
226
  /**
211
227
  * Dense glass for menus and popovers. Nearly opaque so text stays legible
212
228
  * even inside another glass surface (nested backdrop filters cannot see