fix(webserver): upgrade default template to the HTML5 doctype - #110
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.