From 2ae2dd8af0496fa541b870a73bfb563d5c0d9bdb Mon Sep 17 00:00:00 2001 From: cjkas Date: Sun, 25 Oct 2026 21:05:29 +0100 Subject: [PATCH] fix: app.css lost the first rule of widgets.css and icons.css All three CSS files start with a UTF-8 byte order mark. Joined into app.css, the marks of the second and third files sat mid-file, where the browser reads one as part of the next selector and drops that rule: .container's max-width (the page ran full width) and the base icss- icon rule (icons drawn wrong). minify.py now reads the parts as utf-8-sig. Co-Authored-By: Claude Opus 5.5 --- minify.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/minify.py b/minify.py index 6996529..fe47611 100644 --- a/minify.py +++ b/minify.py @@ -284,7 +284,9 @@ def minify_all(): joined = os.path.join(work_dir, name) with open(joined, "w", encoding="utf-8") as out: for part in parts: - with open(os.path.join(src_dir, part), "r", encoding="utf-8") as f: + # utf-8-sig drops a byte order mark: mid-file it would be + # read as part of the next selector, and that rule lost. + with open(os.path.join(src_dir, part), "r", encoding="utf-8-sig") as f: out.write(f.read()) # A file without a final newline would run into the next. out.write("\n")