Re: [OpenJDK 2D-Dev] RFR: 8260314: Replace border="1" on tables with CSS [v3]
On Tue, 26 Jan 2021 17:32:54 GMT, Alexey Ivanov wrote: >> Replace presentational attribute `border="1"` on `` element with CSS >> styles: >> table {border: outset 1px} >> th, td {border: inset 1px} >> >> These declarations produce the same rendering as the default one in Firefox >> and Edge. >> >> Another option is to use `solid` in both cases. > > Alexey Ivanov has updated the pull request incrementally with one additional > commit since the last revision: > > Revert changes to style block in componentProperties.html Marked as reviewed by serb (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/2210
Re: [OpenJDK 2D-Dev] RFR: 8260314: Replace border="1" on tables with CSS
On Tue, 26 Jan 2021 19:17:24 GMT, Jonathan Gibbons wrote: > In general, I recommend where possible using the styles provided in the > standard stylesheet, for overall visual consistency. I totally agree. I overlooked the standard styles for the tables. Thanks to @mrserb for pointing me in the right direction. Since most tables in java.desktop use striped tables, it makes sense to use this style in these files too. Although I had said I preferred `plain` class for `componentProperties.html`, I changed my opinion after looking at the updated file, it feels lighter when striped. The table in `NumericShaper` has confusing rendering with `striped` class, that's why it uses `plain`. > FYI, although it seems like the standard styles work for you in this case, if > you should ever need it, javadoc now supports package-specific and > module-specific stylesheets. Just put `*.css` files in the `doc-files` > subdirectory or a package or module, and javadoc should pick it up and use it. Thank you. It's good to know as it allows for keeping consistent look across files as opposed to applying style changes in individual files. - PR: https://git.openjdk.java.net/jdk/pull/2210
Re: [OpenJDK 2D-Dev] RFR: 8260314: Replace border="1" on tables with CSS
On Tue, 26 Jan 2021 18:33:48 GMT, Alexey Ivanov wrote: >>> Probably we can import the CSS used by the javadoc itself? >> >> We do. For example, [AWT Modality in JDK >> 15](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/Modality.html) >> has borders because of `border="1"` attribute. If you remove it or change >> it to `border="1"` in Developer Tools in browser, the borders around cells >> disappear. >> >> However, I looked into it further: there are tables in Javadoc comments. One >> example is [AWTKeyStroke >> constructor](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/AWTKeyStroke.html#%3Cinit%3E()) >> which uses `class="striped"`. In most cases, classes in java.desktop module >> use striped tables. >> >> There's also `plain` class. I've found one usage of `class=plain"` in >> [NumericShaper >> class](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/font/NumericShaper.html). >> This style has collapsed borders around each cell. It looks similar to what >> we have now in “plain” HTML documents, yet by default the borders are not >> collapsed, that is you see borders around each individual cell. >> >> The stylesheet also declares `borderless` class which has no borders. >> >> For the consistent look and feel of documentation, I think `striped` is the >> most appropriate class. However, I prefer `plain` class for >> `componentProperties.html` file. > > I updated all the tables with `class="striped"`. > > I've also uploaded the files with different styles for visual comparison: > > ### Current: JDK 15 > > - > [DesktopProperties.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/DesktopProperties.html) > - > [Modality.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/Modality.html) > - > [gif_metadata.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) > - > [tiff_metadata.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) > - > [componentProperties.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) > - > [synthFileFormat.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) > > ### Manual: as suggested initially > > - > [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/java/awt/doc-files/DesktopProperties.html) > - > [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/java/awt/doc-files/Modality.html) > - > [gif_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) > - > [tiff_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) > - > [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) > - > [synthFileFormat.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) > > ### Striped: `class="striped"` > > - > [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/java/awt/doc-files/DesktopProperties.html) > - > [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/java/awt/doc-files/Modality.html) > - > [gif_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) > - > [tiff_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) > - > [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) > - > [synthFileFormat.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) > > ### Plain: `class="plain"` > > - > [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/java/awt/doc-files/DesktopProperties.html) > - > [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/java/awt/doc-files/Modality.html) > - > [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) In general, I recommend where
Re: [OpenJDK 2D-Dev] RFR: 8260314: Replace border="1" on tables with CSS
On Tue, 26 Jan 2021 15:39:30 GMT, Alexey Ivanov wrote: >> Probably we can import the CSS used by the javadoc itself? > >> Probably we can import the CSS used by the javadoc itself? > > We do. For example, [AWT Modality in JDK > 15](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/Modality.html) > has borders because of `border="1"` attribute. If you remove it or change it > to `border="1"` in Developer Tools in browser, the borders around cells > disappear. > > However, I looked into it further: there are tables in Javadoc comments. One > example is [AWTKeyStroke > constructor](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/AWTKeyStroke.html#%3Cinit%3E()) > which uses `class="striped"`. In most cases, classes in java.desktop module > use striped tables. > > There's also `plain` class. I've found one usage of `class=plain"` in > [NumericShaper > class](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/font/NumericShaper.html). > This style has collapsed borders around each cell. It looks similar to what > we have now in “plain” HTML documents, yet by default the borders are not > collapsed, that is you see borders around each individual cell. > > The stylesheet also declares `borderless` class which has no borders. > > For the consistent look and feel of documentation, I think `striped` is the > most appropriate class. However, I prefer `plain` class for > `componentProperties.html` file. I updated all the tables with `class="striped"`. I've also uploaded the files with different styles for visual comparison: ### Current: JDK 15 - [DesktopProperties.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/DesktopProperties.html) - [Modality.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/Modality.html) - [gif_metadata.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) - [tiff_metadata.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) - [componentProperties.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) - [synthFileFormat.html](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) ### Manual: as suggested initially - [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/java/awt/doc-files/DesktopProperties.html) - [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/java/awt/doc-files/Modality.html) - [gif_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) - [tiff_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) - [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) - [synthFileFormat.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v1-manual/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) ### Striped: `class="striped"` - [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/java/awt/doc-files/DesktopProperties.html) - [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/java/awt/doc-files/Modality.html) - [gif_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/imageio/metadata/doc-files/gif_metadata.html) - [tiff_metadata.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/imageio/metadata/doc-files/tiff_metadata.html) - [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) - [synthFileFormat.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v2-striped/api/java.desktop/javax/swing/plaf/synth/doc-files/synthFileFormat.html) ### Plain: `class="plain"` - [DesktopProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/java/awt/doc-files/DesktopProperties.html) - [Modality.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/java/awt/doc-files/Modality.html) - [componentProperties.html](http://cr.openjdk.java.net/~aivanov/8260314/borders/v3-plain/api/java.desktop/javax/swing/plaf/synth/doc-files/componentProperties.html) - PR: https://git.openjdk.java.net/jdk/pull/2210
Re: [OpenJDK 2D-Dev] RFR: 8260314: Replace border="1" on tables with CSS [v3]
> Replace presentational attribute `border="1"` on `` element with CSS > styles: > table {border: outset 1px} > th, td {border: inset 1px} > > These declarations produce the same rendering as the default one in Firefox > and Edge. > > Another option is to use `solid` in both cases. Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: Revert changes to style block in componentProperties.html - Changes: - all: https://git.openjdk.java.net/jdk/pull/2210/files - new: https://git.openjdk.java.net/jdk/pull/2210/files/b6f95ed8..9a7d1315 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=2210=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk=2210=01-02 Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/2210.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2210/head:pull/2210 PR: https://git.openjdk.java.net/jdk/pull/2210
Re: [OpenJDK 2D-Dev] RFR: 8260314: Replace border="1" on tables with CSS [v2]
> Replace presentational attribute `border="1"` on `` element with CSS > styles: > table {border: outset 1px} > th, td {border: inset 1px} > > These declarations produce the same rendering as the default one in Firefox > and Edge. > > Another option is to use `solid` in both cases. Alexey Ivanov has updated the pull request incrementally with two additional commits since the last revision: - Remove redundant center-align for element - Apply class="striped" to the tables - Changes: - all: https://git.openjdk.java.net/jdk/pull/2210/files - new: https://git.openjdk.java.net/jdk/pull/2210/files/eb057764..b6f95ed8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=2210=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk=2210=00-01 Stats: 59 lines in 6 files changed: 0 ins; 24 del; 35 mod Patch: https://git.openjdk.java.net/jdk/pull/2210.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/2210/head:pull/2210 PR: https://git.openjdk.java.net/jdk/pull/2210
Re: [OpenJDK 2D-Dev] RFR: 8260314: Replace border="1" on tables with CSS
On Tue, 26 Jan 2021 01:54:10 GMT, Sergey Bylokhov wrote: > Probably we can import the CSS used by the javadoc itself? We do. For example, [AWT Modality in JDK 15](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/doc-files/Modality.html) has borders because of `border="1"` attribute. If you remove it or change it to `border="1"` in Developer Tools in browser, the borders around cells disappear. However, I looked into it further: there are tables in Javadoc comments. One example is [AWTKeyStroke constructor](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/AWTKeyStroke.html#%3Cinit%3E()) which uses `class="striped"`. In most cases, classes in java.desktop module use striped tables. There's also `plain` class. I've found one usage of `class=plain"` in [NumericShaper class](https://docs.oracle.com/en/java/javase/15/docs/api/java.desktop/java/awt/font/NumericShaper.html). This style has collapsed borders around each cell. It looks similar to what we have now in “plain” HTML documents, yet by default the borders are not collapsed, that is you see borders around each individual cell. The stylesheet also declares `borderless` class which has no borders. For the consistent look and feel of documentation, I think `striped` is the most appropriate class. However, I prefer `plain` class for `componentProperties.html` file. - PR: https://git.openjdk.java.net/jdk/pull/2210
Re: [OpenJDK 2D-Dev] RFR: 8260314: Replace border="1" on tables with CSS
On Mon, 25 Jan 2021 11:50:20 GMT, Alexey Ivanov wrote: >> Replace presentational attribute `border="1"` on `` element with CSS >> styles: >> table {border: outset 1px} >> th, td {border: inset 1px} >> >> These declarations produce the same rendering as the default one in Firefox >> and Edge. >> >> Another option is to use `solid` in both cases. > > @jonathan-gibbons, what do you think? Probably we can import the CSS used by the javadoc itself? - PR: https://git.openjdk.java.net/jdk/pull/2210
Re: [OpenJDK 2D-Dev] RFR: 8260314: Replace border="1" on tables with CSS
On Sat, 23 Jan 2021 19:06:05 GMT, Alexey Ivanov wrote: > Replace presentational attribute `border="1"` on `` element with CSS > styles: > table {border: outset 1px} > th, td {border: inset 1px} > > These declarations produce the same rendering as the default one in Firefox > and Edge. > > Another option is to use `solid` in both cases. @jonathan-gibbons, what do you think? - PR: https://git.openjdk.java.net/jdk/pull/2210
[OpenJDK 2D-Dev] RFR: 8260314: Replace border="1" on tables with CSS
Replace presentational attribute `border="1"` on `` element with CSS styles: table {border: outset 1px} th, td {border: inset 1px} These declarations produce the same rendering as the default one in Firefox and Edge. Another option is to use `solid` in both cases. - Commit messages: - Move table styles to common