Skip to content

fix(webserver): upgrade default template to the HTML5 doctype - #110

Merged
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:fix/html5-doctype
Jun 11, 2026
Merged

fix(webserver): upgrade default template to the HTML5 doctype#110
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:fix/html5-doctype

Conversation

@ngosang

@ngosang ngosang commented Jun 11, 2026

Copy link
Copy Markdown
Member

Replace the HTML 4.01 Transitional doctype with <!doctype html> in all 14 template files. The old doctype (without a system URI on most pages) made browsers render the UI in quirks mode; every page now renders in standards mode (document.compatMode == "CSS1Compat").

The mode switch changes three layout behaviours that the table-based layout relied on, compensated in style.css:

  • Percentage heights now need an explicit ancestor height, so the height:100% on table.page no longer reached the viewport and the footer bar floated up right under the content. Give html and body.main height:100% to restore it.
  • text-align now inherits into nested tables (quirks mode blocked that), so the centering rules on table.page row 2 and on table.prefs-grid rows leaked into the content tables, centering every file name and preference label. Drop the former (its children are full-width or self-centered) and scope the latter to the last row, which centers the Apply button.
  • Inline images now sit on the text baseline, leaving a descender gap under them. This let the page background show through between the rounded tab corners and the content, and stretched the 64px header row to 67px, exposing a vertical tiling artifact of fond_haut.png below the navbar. Display the tab corner images and the header logo as blocks.

Verified with before/after headless-Chromium screenshots of every page (login, downloads, servers, shared, search, stats, kad, prefs, log and the footer/stats iframes): rendering is pixel-equivalent except for sub-3px text shifts, and no new console errors appear.

Replace the HTML 4.01 Transitional doctype with <!doctype html> in all
14 template files. The old doctype (without a system URI on most pages)
made browsers render the UI in quirks mode; every page now renders in
standards mode (document.compatMode == "CSS1Compat").

The mode switch changes three layout behaviours that the table-based
layout relied on, compensated in style.css:

- Percentage heights now need an explicit ancestor height, so the
  height:100% on table.page no longer reached the viewport and the
  footer bar floated up right under the content. Give html and
  body.main height:100% to restore it.
- text-align now inherits into nested tables (quirks mode blocked
  that), so the centering rules on table.page row 2 and on
  table.prefs-grid rows leaked into the content tables, centering
  every file name and preference label. Drop the former (its children
  are full-width or self-centered) and scope the latter to the last
  row, which centers the Apply button.
- Inline images now sit on the text baseline, leaving a descender gap
  under them. This let the page background show through between the
  rounded tab corners and the content, and stretched the 64px header
  row to 67px, exposing a vertical tiling artifact of fond_haut.png
  below the navbar. Display the tab corner images and the header logo
  as blocks.

Verified with before/after headless-Chromium screenshots of every page
(login, downloads, servers, shared, search, stats, kad, prefs, log and
the footer/stats iframes): rendering is pixel-equivalent except for
sub-3px text shifts, and no new console errors appear.
@ngosang
ngosang merged commit 01a65d0 into amule-org:master Jun 11, 2026
10 checks passed
@ngosang
ngosang deleted the fix/html5-doctype branch June 11, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant