Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly modernise HTML export #481

Merged
merged 3 commits into from
Aug 2, 2023
Merged

Slightly modernise HTML export #481

merged 3 commits into from
Aug 2, 2023

Conversation

jn64
Copy link
Contributor

@jn64 jn64 commented Aug 1, 2023

The current doctype triggers quirks mode, which is for pre-IE6 compatibility.

I tested all 3 HTML export (table, bullet, outline) of tutorial.cts to make sure they look the same in standards mode (in Firefox 115 on Linux).

The table style looks 100% the same, pixel-perfect. The outline style has negligible alignment differences (some text looks higher by 1px).

The bullet style has 1 visible difference: in quirks mode, nested lists (li > ul) with no text in the parent li has extra padding on top, which I would say is a bug/unintended (from TS' point of view), since there is no extra padding anywhere else.

Screenshot comparing nested lists in quirks mode and standards mode

The font-weight: normal is added to reset the font weight in nested tables, because standards mode properly inherits font styles in tables which quirks mode did not.

Benefit of this change is users who edit the HTML export (e.g. to apply additional styling) should have more predictable modern behaviour.

@jn64 jn64 marked this pull request as draft August 1, 2023 10:16
@jn64 jn64 marked this pull request as ready for review August 1, 2023 10:19
@aardappel
Copy link
Owner

Thanks for modernizing :)

@aardappel aardappel merged commit 4548a14 into aardappel:master Aug 2, 2023
4 checks passed
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.

2 participants