RFR: JDK-8315921: Invalid CSS declarations in java.lang class documentation [v2]
Hannes Wallnöfer
hannesw at openjdk.org
Thu Nov 2 11:27:04 UTC 2023
On Wed, 25 Oct 2023 09:09:07 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/Thread.java line 192:
>>
>>> 190: * with the following system properties:
>>> 191: * <table class="striped">
>>> 192: * <caption style="display:none;">System properties</caption>
>>
>> Just out of curiosity, is that semi-colon even needed, or would `display:none` be enough?
>
> Now that I think about it, do you know why the `display:none` is being set here? I have very limited knowledge of CSS, wouldn't the use of `display:none` make the `System Properties` caption text invisible?
Indeed, the semi-colon is optional at the end of an inline CSS attribute. I removed it in my follow-up commit.
Regarding the presence of invisible `<caption>` elements in HTML tables: this is indeed questionable. I assume it was based on the notion that a `<caption>` element is required in HTML tables, which is not the case (neither for HTML4 nor HTML5). However, it is quite pervasive (there are around 170 occurrences of `<caption style="display:none">` in OpenJDK source), and one could argue that it serves as an informational comment both in Java and HTML.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15762#discussion_r1379955443
More information about the core-libs-dev
mailing list