Adopt makeover-webview phase A
Third generated stylesheet in a pipeline that already runs twice.
build.rs materialises css/layout.css from makeover-webview beside
themes/ and geometry.css, index.html links it, and it is gitignored like
the other two.
--bevel-raised and --bevel-inset are gone from styles.css. The
composition (which edge is lit, what inverts on press) is the
description's now, the same way colour is makeover's and spacing is
makeover-geometry's; nothing app-local is left of the bevel. The crate
asserts its emitted text against what this app hand-wrote, so the 47
places that read those tokens see the same values and nothing moves on
screen.
Phase A is the stylesheet only. This app builds markup from template
literals at 145 sites, so generated markup is a migration while a
generated stylesheet is a deletion. The .raised and .well classes arrive
unused; adopting them at call sites is phase B.
6 files changed,
+51 insertions,
-6 deletions
| 51 |
51 |
|
|
| 52 |
52 |
|
# Generated by src-tauri/build.rs from makeover-geometry's scale
|
| 53 |
53 |
|
/src-tauri/frontend/css/geometry.css
|
|
54 |
+ |
/src-tauri/frontend/css/layout.css
|
| 2248 |
2248 |
|
"mailparse",
|
| 2249 |
2249 |
|
"makeover",
|
| 2250 |
2250 |
|
"makeover-geometry",
|
|
2251 |
+ |
"makeover-webview",
|
| 2251 |
2252 |
|
"notify",
|
| 2252 |
2253 |
|
"notify-debouncer-mini",
|
| 2253 |
2254 |
|
"open",
|
| 3379 |
3380 |
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
| 3380 |
3381 |
|
checksum = "9d8b94e51333489b0a79bb63ad4100ca49726f2048e2477f6ee3d6dd822f9327"
|
| 3381 |
3382 |
|
|
|
3383 |
+ |
[[package]]
|
|
3384 |
+ |
name = "makeover-layout"
|
|
3385 |
+ |
version = "0.1.0"
|
|
3386 |
+ |
|
|
3387 |
+ |
[[package]]
|
|
3388 |
+ |
name = "makeover-webview"
|
|
3389 |
+ |
version = "0.1.0"
|
|
3390 |
+ |
dependencies = [
|
|
3391 |
+ |
"makeover-layout",
|
|
3392 |
+ |
]
|
|
3393 |
+ |
|
| 3382 |
3394 |
|
[[package]]
|
| 3383 |
3395 |
|
name = "maplit"
|
| 3384 |
3396 |
|
version = "1.0.2"
|
| 5970 |
5982 |
|
name = "synckit-client"
|
| 5971 |
5983 |
|
version = "0.6.0"
|
| 5972 |
5984 |
|
dependencies = [
|
|
5985 |
+ |
"apple-native-keyring-store",
|
| 5973 |
5986 |
|
"argon2",
|
| 5974 |
5987 |
|
"base64 0.22.1",
|
| 5975 |
5988 |
|
"bytes",
|
| 5977 |
5990 |
|
"chrono",
|
| 5978 |
5991 |
|
"hex",
|
| 5979 |
5992 |
|
"keyring",
|
|
5993 |
+ |
"keyring-core",
|
| 5980 |
5994 |
|
"parking_lot",
|
| 5981 |
5995 |
|
"rand 0.10.2",
|
| 5982 |
5996 |
|
"reqwest",
|
| 16 |
16 |
|
tauri-build = { workspace = true }
|
| 17 |
17 |
|
makeover.workspace = true
|
| 18 |
18 |
|
makeover-geometry.workspace = true
|
|
19 |
+ |
# Phase A of the description layer: the component stylesheet, emitted at build
|
|
20 |
+ |
# time beside geometry.css. Path dep while unpublished.
|
|
21 |
+ |
makeover-webview = { path = "../../../Libraries/makeover-webview" }
|
| 19 |
22 |
|
|
| 20 |
23 |
|
[dependencies]
|
| 21 |
24 |
|
goingson-core = { workspace = true }
|
| 60 |
60 |
|
std::fs::write(path, css).expect("write geometry.css");
|
| 61 |
61 |
|
}
|
| 62 |
62 |
|
|
|
63 |
+ |
/// Write the component layer `makeover-webview` emits into
|
|
64 |
+ |
/// `frontend/css/layout.css`, which `index.html` links after `geometry.css`
|
|
65 |
+ |
/// and before the stylesheet.
|
|
66 |
+ |
///
|
|
67 |
+ |
/// Third generated file in a pipeline that already runs twice, and the same
|
|
68 |
+ |
/// shape as the other two: a crate owns the rule, `build.rs` materialises it,
|
|
69 |
+ |
/// the app links it and never edits it.
|
|
70 |
+ |
///
|
|
71 |
+ |
/// Phase A is the stylesheet only, deliberately. This app builds markup from
|
|
72 |
+ |
/// template literals at 145 sites, so adopting generated *markup* is a
|
|
73 |
+ |
/// migration; adopting a generated stylesheet is a deletion. The `--bevel-*`
|
|
74 |
+ |
/// properties this emits were hand-written in `styles.css` until now, and the
|
|
75 |
+ |
/// crate has a test asserting the emitted text matches what both Tauri apps
|
|
76 |
+ |
/// wrote by hand, so this changes nothing on screen.
|
|
77 |
+ |
///
|
|
78 |
+ |
/// The file is generated, and gitignored.
|
|
79 |
+ |
fn materialize_layout() {
|
|
80 |
+ |
let css = makeover_webview::stylesheet(&makeover_webview::Emit::default());
|
|
81 |
+ |
let path = Path::new(env!("CARGO_MANIFEST_DIR"))
|
|
82 |
+ |
.join("frontend")
|
|
83 |
+ |
.join("css")
|
|
84 |
+ |
.join("layout.css");
|
|
85 |
+ |
std::fs::write(path, css).expect("write layout.css");
|
|
86 |
+ |
}
|
|
87 |
+ |
|
| 63 |
88 |
|
fn main() {
|
| 64 |
89 |
|
materialize_themes();
|
| 65 |
90 |
|
materialize_geometry();
|
|
91 |
+ |
materialize_layout();
|
| 66 |
92 |
|
tauri_build::build();
|
| 67 |
93 |
|
}
|
| 31 |
31 |
|
<!-- Generated from makeover-geometry by src-tauri/build.rs. First, so the
|
| 32 |
32 |
|
stylesheet can read --gap-* and --step-* off :root. -->
|
| 33 |
33 |
|
<link rel="stylesheet" href="css/geometry.css">
|
|
34 |
+ |
<link rel="stylesheet" href="css/layout.css">
|
| 34 |
35 |
|
<link rel="stylesheet" href="css/styles.min.css">
|
| 35 |
36 |
|
</head>
|
| 36 |
37 |
|
<body>
|
| 283 |
283 |
|
--border-width: 1px;
|
| 284 |
284 |
|
--border-width-sm: 1px;
|
| 285 |
285 |
|
|
| 286 |
|
- |
/* The two-tone bevel. Raised is lit from the top left; inset is the same
|
| 287 |
|
- |
bevel inverted, which is also the pressed state for anything raised. */
|
| 288 |
|
- |
--bevel-raised: inset 1px 1px 0 var(--bevel-light),
|
| 289 |
|
- |
inset -1px -1px 0 var(--bevel-dark);
|
| 290 |
|
- |
--bevel-inset: inset 1px 1px 0 var(--bevel-dark),
|
| 291 |
|
- |
inset -1px -1px 0 var(--bevel-light);
|
|
286 |
+ |
/* --bevel-raised and --bevel-inset used to be written out here. They now
|
|
287 |
+ |
come from css/layout.css, which build.rs generates from
|
|
288 |
+ |
makeover-webview: the composition (which edge is lit, what inverts on
|
|
289 |
+ |
press) is the description's, the same way the colours are makeover's and
|
|
290 |
+ |
the spacing is makeover-geometry's. Nothing app-local is left of it.
|
|
291 |
+ |
The .raised and .well classes arrive in the same file. */
|
| 292 |
292 |
|
|
| 293 |
293 |
|
/* Drop-shadow offset scale. Only floating surfaces cast one now: raised
|
| 294 |
294 |
|
objects are read by their bevel, so the xs step and the bare 4px offset
|