jdk
jdk copied to clipboard
JDK-8289334: Use CSS variables to define fonts and colors
Please review a change to use CSS custom properties (aka variables) to define the fonts and colors in generated documentation. It is now possible to change the fonts and colors of generated API documentation by changing the values of these properties directly or by using extra stylesheet.
Documentation rendered with the updated stylesheet is mostly identical pixel-by-pixel to the previous documentation with very few exceptions:
- Some colors have been unified to reduce the number of variable definitions:
- Single pixel borders used in class documentation pages use a single shade of gray (most visible in headers of member details which now have light gray instead of a darker gray border)
- Header cells of user defined tables now use the same color as structural tables
- Some sub-pixel sizing and spacing changes in random places
Contrary to previously stated intention I did not change the stylesheet to become more flexible (e.g. to allow combinations of background and foreground colors that are not currently supported). The reason is that this would have at least doubled the number of color properties and required new CSS rules, increasing the complexity of the style sheet and risking to add new bugs. Reducing the number of variables makes it easier to customize the layout and also preserves part of the original design by reducing the number of colors to a smaller color palette
The only code change is due to the removal of jquery-ui-overrides.css which had to be integrated into the main stylesheet in order to make use of CSS custom properties.
Progress
- [ ] Change must be properly reviewed (1 review required, with at least 1 Reviewer)
- [x] Change must not contain extraneous whitespace
- [x] Commit message must refer to an issue
Issue
- JDK-8289334: Use CSS variables to define fonts and colors
Reviewing
Using git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9839/head:pull/9839
$ git checkout pull/9839
Update a local copy of the PR:
$ git checkout pull/9839
$ git pull https://git.openjdk.org/jdk pull/9839/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9839
View PR using the GUI difftool:
$ git pr show -t 9839
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9839.diff
:wave: Welcome back hannesw! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.
@hns The following label will be automatically applied to this pull request:
javadoc
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.
@hns This change now passes all automated pre-integration checks.
ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.
After integration, the commit message for the final commit will be:
8289334: Use CSS variables to define fonts and colors
Reviewed-by: jjg
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.
At the time when this comment was updated there had been 59 new commits pushed to the master branch:
- 0fc92637d297d9a1281df33089975bd6d5fdf809: 8291828: Reduce runtime of java.util.stream microbenchmarks
- e81210f5fe03ea3dc9c9fb0dba2be79e1dcc03bc: 8292352: 32-bit Windows build failures after JDK-8290059
- f45b8408a0e66aee22a6ac60e3f24dfc8ac104e5: 8292384: Convert AdapterHandlerTable to ResourceHashtable
- 0c67fba11f444cc3739f66c8a2d57564b5dcca72: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning
- bf7d6d3a0f947ab4a30f27bce6650798289cc7fd: 7132413: [macosx] closed/javax/swing/AbstractButton/5049549/bug5049549.java fails on MacOS
- e230719ad3cc9e70511d7baa6338bb77cd038139: 8292448: Convert BitMapFragmentTable to ResourceHashtable
- f75da2235ab7e33927729fa060ec4d86fdb0240f: 8292395: [testbug] VectorGatherScatterTest.java fails on SVE with -XX:MaxVectorSize=8 after JDK-8288397
- 802ef38060080254e55621e4c64fa31a6c0b7b18: 8292327: java.io.EOFException in InflaterInputStream after JDK-8281962
- e61f6fc3940720f6ebc3ef360e25b880729cfa5a: 8292362: java/lang/Thread/jni/AttachCurrentThread/AttachTest.java#id1 failed on some platforms
- 0bfb12162f6035559a114176115b91aff6df3b64: 8292051: jdk/internal/misc/TerminatingThreadLocal/TestTerminatingThreadLocal.java failed "AssertionError: Expected terminated values: [666] but got: []"
- ... and 49 more: https://git.openjdk.org/jdk/compare/ad5f628c58c46438f2f542d5255e5fd1fa4d0c6b...master
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.
➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.
Thanks, I agree about the "all colors and fonts should be defined by properties" role. Since I would like to get this integrated rather sooner than later I'll file a follow-up JBS issue for that.
/integrate
Going to push as commit d5435642f9671766ecbcbf744ecd8e62fb929a69.
Since your change was applied there have been 65 commits pushed to the master branch:
- 2ee9491a60c956da94debfbf0195f9339403ea98: 8289051: C2: Cleanup PhaseCCP::analyze()
- 32d675ca607d341ca3428efc32e212701775e3c6: 8291775: C2: assert(r != __null && r->is_Region()) failed: this phi must have a region
- 0d96546ab93600f17877e5db2770e4125916bcda: 8292054: Test runtime/posixSig/TestPosixSig.java fails with 'Test failed, bad output.'
- e8bc87956abc92851de8694c56a78f6ecc546cbd: 8292443: Weak CAS VarHandle/Unsafe tests should test always-failing cases
- 494d3873b1d0f7e3ca0a063b44362e7242298dec: 8280152: AArch64: Reuse runtime call trampolines
- 8b4e6ba01ffef77d5f1b9a9aa3e978f4da431836: 8289332: Auto-generate ids for user-defined headings
- 0fc92637d297d9a1281df33089975bd6d5fdf809: 8291828: Reduce runtime of java.util.stream microbenchmarks
- e81210f5fe03ea3dc9c9fb0dba2be79e1dcc03bc: 8292352: 32-bit Windows build failures after JDK-8290059
- f45b8408a0e66aee22a6ac60e3f24dfc8ac104e5: 8292384: Convert AdapterHandlerTable to ResourceHashtable
- 0c67fba11f444cc3739f66c8a2d57564b5dcca72: 8289049: x86_32 build fails with GCC 11 due to newString646_US warning
- ... and 55 more: https://git.openjdk.org/jdk/compare/ad5f628c58c46438f2f542d5255e5fd1fa4d0c6b...master
Your commit was automatically rebased without conflicts.
@hns Pushed as commit d5435642f9671766ecbcbf744ecd8e62fb929a69.
:bulb: You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.
Filed as follow-up bug: https://bugs.openjdk.org/browse/JDK-8292594
I'll approve it, but I would still recommend that either now or later we establish a rule that says that all colors and font choices are set via CSS custom properties.