-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: Update CSS user agent default style sheet #1255
Merged
Merged
Conversation
This file contains 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
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
MurakamiShinyu
force-pushed
the
feat/update-ua-stylesheet
branch
from
January 29, 2024 07:59
4e9a2d9
to
5f2001e
Compare
MurakamiShinyu
force-pushed
the
feat/update-ua-stylesheet
branch
from
January 29, 2024 08:18
5f2001e
to
230a291
Compare
This updates the CSS user agent default stylesheet in Vivliostyle.js to conform to the latest web standards. (Issue: #1128) Summary of changes: | Elements | Property | Old | New | |-------------------------|--------------|--------|---------| | h2 | margin-block | 0.75em | 0.83em | | h3 | margin-block | 0.83em | 1em | | h4 | margin-block | 1em | 1.33em | | h5 | margin-block | 1em | 1.67em | | h6 | margin-block | 1em | 2.33em | | h6 | font-size | 0.75em | 0.67em | | h1, h2, h3, h4, h5, h6 | font-weight | bolder | bold | | blockquote, ol, ul, dir, menu | margin-block | 0 | 1em | | [dir=ltr], [dir=rtl] | unicode-bidi | embed | isolate | | figure | margin-block | -- | 1em | | figure | margin-inline| -- | 40px | | hr | margin-block | -- | 0.5em | | hr[color], hr[noshade] | border-style | -- | solid | | dfn | font-style | -- | italic | | listing, plaintext, xmp | white-space | -- | pre | | pre[wrap] | white-space | -- | pre-wrap| | details, dialog, legend, listing, optgroup, option, plaintext, search, xmp | display | -- | block | | table | box-sizing | -- | border-box | | table | border-collapse | -- | separate | | table | text-indent | -- | initial | | tr | vertical-align | -- | inherit | Also this removes the following styles that have no effect or should be leave to the browser's default: - `html, address, blockquote, body, dd, div, dl, dt, fieldset, form, … { unicode-bidi: normal; }` - `h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dir, menu, fieldset, form { margin-inline: 0; }` - `fieldset, form { margin-block: 1em; }` - `audio, video { break-inside: avoid; }` - `rtc, rt { font-variant-east-asian: ruby; }` - `rtc:lang(zh), rt:lang(zh) { ruby-align: center; }`
MurakamiShinyu
force-pushed
the
feat/update-ua-stylesheet
branch
from
January 29, 2024 08:37
230a291
to
b0993a0
Compare
TestTest HTML file: default-style.html Test with Vivliostyle Viewer:
Screenshots: "Before" (left), "After" (mid), and Google Chrome (right) |
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.
This updates the CSS user agent default stylesheet in Vivliostyle.js to conform to the latest web standards. (Issue: #1128)
Summary of changes:
Also this removes the following styles that have no effect or should be leave to the browser's default:
html, address, blockquote, body, dd, div, dl, dt, fieldset, form, … { unicode-bidi: normal; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dir, menu, fieldset, form { margin-inline: 0; }
fieldset, form { margin-block: 1em; }
audio, video { break-inside: avoid; }
rtc, rt { font-variant-east-asian: ruby; }
rtc:lang(zh), rt:lang(zh) { ruby-align: center; }