Repository navigation
Expand file tree
/
Copy pathglobal.css
More file actions
113 lines (105 loc) · 3.52 KB
/
Copy pathglobal.css
File metadata and controls
113 lines (105 loc) · 3.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
/* Global layout reset — fixes browser-default 8px body margin that causes
* the visible inset border and status-bar clipping on every platform.
* Research basis: MDN "CSS box model", Tauri 2 webview default style notes. */
*,
*::before,
*::after {
box-sizing: border-box;
}
html,
body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
overflow: clip;
overscroll-behavior: none;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: transparent;
}
/* ── Native form controls: one typography default, no UA leak ──
*
* The browser gives `button`, `input`, `select`, and `textarea` a UA
* stylesheet default of `font: 13.3333px Arial` (the platform UI font at the
* platform size), which is *not* the application's interface face or size.
* Without this reset every control silently renders Arial at a size that
* matches no token, and each component has to remember `font: inherit` on
* its own — the app had 28 scattered copies of that patch and controls were
* still leaking (2026-09-20 audit).
*
* The reset assigns the canonical interface-control role instead of
* `inherit`: a control inside a display-font container must not become a
* display-font control. Components that need a different role (a caption in
* the status bar, a micro icon button) set it explicitly, exactly as they
* already do for colour.
*
* `color: inherit` is deliberate — controls adopt the surrounding text
* colour (including disabled/danger contexts) until a component overrides
* it with a semantic text role.
*
* `text-size-adjust: 100%` stops mobile WebKit/Blink text auto-boosting,
* which would otherwise enlarge interface text in portrait layouts and break
* the control-height ladder.
*/
button,
input,
optgroup,
select,
textarea {
font-family: var(--type-interface-control-family);
font-size: var(--type-interface-control-size);
font-weight: var(--type-interface-control-weight);
line-height: var(--type-interface-control-line-height);
color: inherit;
}
html {
text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body {
font-family: var(--font-body);
font-size: var(--font-size-md);
line-height: var(--font-line-normal);
color: var(--color-text-primary);
background: var(--color-surface-app);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-rendering: optimizeLegibility;
font-feature-settings:
"kern" 1,
"liga" 1;
}
#root {
width: 100dvw;
height: 100dvh;
overflow: clip;
}
/* GPU compositing layer promotion — applied to containers that animate,
* scroll, or render many children (editor shell, layers tree, canvas, bento cells).
* Prevents layout thrashing and frame drops during transitions. */
.gpu-layer {
transform: translate3d(0, 0, 0);
backface-visibility: hidden;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
contain: layout style paint;
}
/* Ephemeral-storage warning banner. Shown when the real storage backend could
* not be constructed and the app fell back to in-memory storage, which
* previously happened silently (WCAG 3.3.1 / 4.1.3). */
.varve-ephemeral-storage-banner {
flex-shrink: 0;
padding: var(--space-2) var(--space-3);
background: var(--color-feedback-warning);
color: var(--color-text-on-warning);
font-size: var(--font-size-sm);
text-align: center;
}
.varve-policy-banner {
flex-shrink: 0;
padding: var(--space-2) var(--space-3);
background: var(--color-feedback-warning);
color: var(--color-text-on-warning);
font-size: var(--font-size-sm);
text-align: center;
}