RFR: JDK-8289334: Use CSS variables to define fonts and colors
Jonathan Gibbons
jjg at openjdk.org
Wed Aug 17 16:30:26 UTC 2022
On Wed, 17 Aug 2022 11:49:41 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Head.java line 333:
>>
>>> 331: // The order of the addStylesheet(...) calls is important
>>> 332: addStylesheet(head, DocPaths.SCRIPT_DIR.resolve(DocPaths.JQUERY_UI_CSS));
>>> 333: addStylesheet(head, DocPaths.JQUERY_OVERRIDES_CSS);
>>
>> The edit as-is is OK, but the general code here makes me wonder if this class belongs in the `markup` package.
>
> I don't see the problem. The `Head` class generates part of the page markup, so the package seems fitting to me.
It's in a gray area. The `markup` package was supposed to be low-level primitives for building basic HTML trees ... and these lines reflect policy more than underlying support. We moved `Table` and `Navigation` out of `markup` for the same reason. Anyway, this is just a discussion, not a blocker.
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css line 89:
>>
>>> 87: }
>>> 88: h1 {
>>> 89: font-size:1.428em;
>>
>> I appreciate these numbers give per-pixel consistency with before, but 3 decimal places seems a bit extreme!
>
> I agree. I only went to the third decimal position when it was actually necessary to retain the exact font size. But it would probably not have caught anybody's eye had I rounded to the nearest two decimal number. I guess I could do that to make it more uniform.
I would leave it for now, for this release, and maybe we tweak/simplify the constants later on.
-------------
PR: https://git.openjdk.org/jdk/pull/9839
More information about the javadoc-dev
mailing list