On Wed, 22 Sep 2021 17:06:24 GMT, Jonathan Gibbons <[email protected]> wrote:
>> Hannes Wallnöfer has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> JDK-8273034: tweak button height
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Navigation.java
> line 369:
>
>> 367: };
>> 368: if (nested) {
>> 369: tree.add(HtmlTree.LI(HtmlTree.P(label))
>
> Is the `HtmlTree.P` necessary/useful?
I think it is necessary, at least I haven't found an alternative solution.
The `<li>` element we are creating here contains the main label as well as a
nested list of links. The `<li>` elements of the nested list are sized and
padded via CSS. In order to apply similar size and padding to the main label it
needs to be contained in an element with block display.
I realize the use of `<p>` instead of `<div>` may seem a bit strange as the
label does not really represent a paragraph. I think I chose it because it had
more useful default sizing rules. However, I could easily switch to using a
`<div>` instead.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5360