On Tue, 26 Nov 2024 15:50:54 GMT, Hannes Wallnöfer <hann...@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.

Looks good. In fact, the style inconsistency is manifest in the header: 
https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/lang/classfile/CodeBuilder.html

Another thing of note is that the classes in nested class summary has a preview 
superscript marker, but not so for methods or fields in their respective 
summary sections.  We can look into that later.

-------------

Marked as reviewed by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/22393#pullrequestreview-2462336312

Reply via email to