Repository navigation
Keep HTML 4 pages intact and convert a WoltLab forum - #5
Open
mgroeber9110 wants to merge 2 commits into
Open
mgroeber9110 wants to merge 2 commits into
mgroeber9110 wants to merge 2 commits into
Conversation
New test pages: thobipix.de and geos-infobase.de (hand-written HTML 4 table layouts that should not change) and the GEOS-InfoBase forum (WoltLab Suite 6). Old-style pages: - Presentational attributes (<font>, bgcolor, align, nowrap, <body text link>) take part in the cascade; the page's own <font> tags are not wrapped in another <font>. - Quirks mode for old or missing doctypes: tables do not inherit font size and alignment. Cells inside centered content set their own align. - <body bgcolor/link/vlink/alink> are kept; links in the page's link color need no extra color. - Non-breaking spaces are no longer collapsed, also in otherwise empty cells. No font CSS on table and row elements (cells set their own). Forum patterns: - Text from ::before / ::after (separators, attr()), without icon font glyphs or absolutely positioned pseudo-elements. - Grids with an item spanning all rows become one row with stacked columns; nowrap grid items get nowrap cells. - Wrapping flex rows of plain text items become running text. - Horizontal margins between flex items add to the gap. - p/h1-h6 with zero margins become <div>, inline headings <span>. - max-height scales images; transparent borders are no borders. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1zAu3pLpJpZYnnFGdV5mm
Boxes with only vertical padding (cards with py-2) got cellpadding 0, so stacked teasers ran together. Vertical padding up to 8px now counts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K1zAu3pLpJpZYnnFGdV5mm
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.
Requested by Marcus · project thread
Summary
Three new test pages (kept in the project folder, not in the repo):
and left alignment inside<center>, and resized headings inside<font size="-1">.Old-style pages
<font>,bgcolor,align,nowrap,<body text link>) now take part in the cascade. The page's own<font>tags are no longer wrapped in another<font>.align, because legacy browsers differ on whether cells inherit it.<body bgcolor/link/vlink/alink>are kept. Links in the page's link color need no extra color.collapse()no longer turns (and U+202F) into normal spaces. A cell that contains only keeps it, so its background still shows in old browsers.Forum patterns
::before/::after(":"," · ",attr()). Icon font glyphs (private use area, or icon fonts that draw letters) and absolutely positioned pseudo-elements are left out."icon content lastPosts" "icon stats lastPosts") becomes one row with stacked columns. As table rows, the stacked items were pulled apart.pandh1–h6with zero vertical margins become<div>, and inline headings become<span>. To make this work, the UA stylesheet now has the default heading and paragraph margins.max-heightscales images with the same aspect ratio. A transparentborder-colorcounts as no border.Effect on the other test pages
Text coverage stays at 100% everywhere. Pages wider than 800px got narrower: heise went from 824 to 800 px and spiegel from 1786 to 1415 px. csstricks went from 1185 to 1207 px; its already known overflow comes from the slider headings. Pages are shorter because headings with
margin: 0lose their blank lines. Spot checks of tagesschau, t3n, ndr and heise against the original look closer than before.Test plan
python -m pytest(101 passed). New unit tests are intests/test_convert.py. The new pattern pagestests/pages/legacy-homepage.htmlandtests/pages/forum-board.htmluse neutral text.python tools/testpages.pyon all 16 saved pagestestpages/vergleich-thobipix.png,vergleich-geos.png,vergleich-geos-forum.png)Generated by Claude Code