Skip to content

refactor(webserver): migrate remaining table/iframe attributes to CSS - #99

Closed
ngosang wants to merge 1 commit into
amule-org:masterfrom
ngosang:fix/table-attrs-to-css
Closed

refactor(webserver): migrate remaining table/iframe attributes to CSS#99
ngosang wants to merge 1 commit into
amule-org:masterfrom
ngosang:fix/table-attrs-to-css

Conversation

@ngosang

@ngosang ngosang commented Jun 11, 2026

Copy link
Copy Markdown
Member

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:

  • 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).

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
ngosang force-pushed the fix/table-attrs-to-css branch from 0128f44 to f9ecfce Compare June 11, 2026 13:40
@ngosang

ngosang commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

closed by #102

@ngosang ngosang closed this Jun 11, 2026
@ngosang
ngosang deleted the fix/table-attrs-to-css branch June 11, 2026 15:01
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