Integrated: 8318416: Superscript marks should use consistent font style
Hannes Wallnöfer
hannesw at openjdk.org
Tue Nov 26 18:53:43 UTC 2024
On Tue, 26 Nov 2024 15:50:54 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
> Please review a change to use consistent styles for the `PREVIEW` and `RESTRICTED` superscript labels in API docs. Previously, these labels inherited font style properties from their containing element, such as bold font in summary table links, or serif font in links contained in description text (see attached screenshots).
>
> With this change, superscript labels always use normal weight monospace font. Additionally, they now have a light gray background to make them easier to distinguish from surrounding text and give them a tag-like appearance.
>
> Before / after screenshots:
>
> <img width="773" alt="preview-summary-old" src="https://github.com/user-attachments/assets/fbb4e325-f706-4b54-88cd-34c207a2de25">
>
> <img width="766" alt="preview-summary-new" src="https://github.com/user-attachments/assets/9cbe490d-0444-4c4f-a1f6-004754552166">
>
> I also cleaned up the styles for `<sup>` elements in other contexts. Where the content of `<sup>` was previously [too big] or [too small] it now uses the browser default again.
>
> [too big]: https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/Math.html#scalb(double,int)
> [too small]: https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/Math.html#expm1(double)
>
> Sorry if the diff is a bit more complex than necessary, I reformatted the code that generates the labels when adding the `HtmlStyles` argument. I also removed 3 unused `<table>`-related methods from `HtmlTree` that are not likely to be needed again.
This pull request has now been integrated.
Changeset: 9458a435
Author: Hannes Wallnöfer <hannesw at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/9458a4355fc0778311c19e67abdbd2c7fadd15e7
Stats: 156 lines in 10 files changed: 46 ins; 52 del; 58 mod
8318416: Superscript marks should use consistent font style
Reviewed-by: liach
-------------
PR: https://git.openjdk.org/jdk/pull/22393
More information about the javadoc-dev
mailing list