refactor(webserver): migrate remaining table/iframe attributes to CSS - #99
Closed
ngosang wants to merge 1 commit into
Closed
refactor(webserver): migrate remaining table/iframe attributes to CSS#99ngosang wants to merge 1 commit into
ngosang wants to merge 1 commit into
Conversation
Finish the presentational-HTML migration started in amule-project#95. That commit covered background=/bgcolor=/align=/valign=/border= and the body margins; this one retires what was left, keeping the quirks mode doctype untouched so the table layout renders exactly as before: - cellspacing= / cellpadding= are dropped from every table. A global `table { border-spacing: 0 }` plus `padding: 0` on the existing th/td rules covers the 0/0 case used almost everywhere; the three exceptions get spacing1 (login box frame), spacing6 (prefs and Kad toolbars) and pad4 (search form) classes. pad4 uses a `> tbody > tr > td` child selector so it matches the cellpadding semantics of styling only the table's own cells. - width= on td/th (deprecated since HTML 4.01) and width=/height= on table (height was never valid HTML, it works via quirks mode) become w*/h* utility classes next to the existing h10..h200 set, with a `p` suffix for percentages (w50p, h100p, ...). - frameborder="0" and width="100%" on the footer/stats/stats_tree iframes become `iframe.noborder` and w100p classes. The two log.php iframes keep their default border as today (they never set frameborder), so they only get w100p. - scrolling="no" (obsolete, no CSS equivalent on the iframe element) is replaced by `overflow: hidden` on the body of the two framed documents themselves, footer.php and stats.php (body.frame). Pixel heights on img and iframe stay as attributes - they are valid, non-presentational HTML. Verified against a running amuleweb: before/after headless-Chromium screenshots of all 9 pages plus the two footer frames are pixel-identical except for dynamic content (stats graphs, uptime, server user/file counts).
ngosang
force-pushed
the
fix/table-attrs-to-css
branch
from
June 11, 2026 13:40
0128f44 to
f9ecfce
Compare
Member
Author
|
closed by #102 |
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.
Finish the presentational-HTML migration started in #95. That commit covered background=/bgcolor=/align=/valign=/border= and the body margins; this one retires what was left, keeping the quirks mode doctype untouched so the table layout renders exactly as before:
table { border-spacing: 0 }pluspadding: 0on the existing th/td rules covers the 0/0 case used almost everywhere; the three exceptions get spacing1 (login box frame), spacing6 (prefs and Kad toolbars) and pad4 (search form) classes. pad4 uses a> tbody > tr > tdchild selector so it matches the cellpadding semantics of styling only the table's own cells.psuffix for percentages (w50p, h100p, ...).iframe.noborderand w100p classes. The two log.php iframes keep their default border as today (they never set frameborder), so they only get w100p.overflow: hiddenon the body of the two framed documents themselves, footer.php and stats.php (body.frame).Pixel heights on img and iframe stay as attributes - they are valid, non-presentational HTML.
Verified against a running amuleweb: before/after headless-Chromium screenshots of all 9 pages plus the two footer frames are pixel-identical except for dynamic content (stats graphs, uptime, server user/file counts).