mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-10-31 13:52:15 +01:00
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:
parent
3212230f01
commit
2ae2dd8af0
1 changed files with 3 additions and 1 deletions
|
|
@ -284,7 +284,9 @@ def minify_all():
|
||||||
joined = os.path.join(work_dir, name)
|
joined = os.path.join(work_dir, name)
|
||||||
with open(joined, "w", encoding="utf-8") as out:
|
with open(joined, "w", encoding="utf-8") as out:
|
||||||
for part in parts:
|
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())
|
out.write(f.read())
|
||||||
# A file without a final newline would run into the next.
|
# A file without a final newline would run into the next.
|
||||||
out.write("\n")
|
out.write("\n")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue