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 <noreply@anthropic.com>
This commit is contained in:
cjkas 2026-10-25 21:05:29 +01:00
parent 3212230f01
commit 2ae2dd8af0

View file

@ -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")