On Mon, 20 Jun 2022 17:46:34 GMT, Hannes Wallnöfer <[email protected]> wrote:
> Please review an important CSS-only fix for the output generated by JavaDoc.
>
> Various mobile browsers have a feature called "font boosting" or "text
> inflation" to selectively increase the font size of parts of the page to make
> them easier to read. Since javadoc-generated pages have a `<meta
> name="viewport" content="width=device-width, initial-scale=1">` declaration
> that is not really needed, but especially Chrome on Android is very stubborn
> and insists on changing font sizes in an unpredictable way.
>
> It seems like the only way to prevent Chrome/Android from doing this is to
> include a `min-height` CSS property. In JDK-8277420 we therefore included the
> CSS declaration shown below to avoid headers from changing font size when the
> copy-to-clipboard button is shown:
>
>
> /* Disable font boosting */
> h1, h2, h3, h4, h5, h6 {
> max-height: 2em;
> }
>
>
> The idea was that a max-height of `2em` would be enough for how headers are
> displayed in our docs, but of course I didn't consider wrapped headers. In
> fact, the main header of the index page is often wrapped twice on small
> browsers/devices, resulting in the header overlapping with the first
> paragraph:
>
> 
>
> Font boosting also occurs in member signatures where some parts are displayed
> with bigger fonts than others. This is less obvious than the other cases, but
> it should also be fixed:
>
> 
>
> The proposed fix is to use a very high `max-height` value that is far beyond
> actual height values, and to include member signatures in the CSS selector.
>
> This fixes the problems in the screenshots above in Chrome/Android as shown
> in the screenshots below. It does not have any effects in other browsers.
>
> 
> Fixed index page
>
> 
> Fixed member signature
Marked as reviewed by jjg (Reviewer).
-------------
PR: https://git.openjdk.org/jdk19/pull/48