RFR: 8179367: update use of align, valign attributes in java.base to use style attribute

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Apr 26 22:52:10 UTC 2017


Martin,

I would agree that in a stylesheet .css file it would be better to 
include the terminating semicolon, especially when the items are laid 
out on multiple lines.

Here, they're in inline style attributes, so I don't think the trailing 
semicolon is so important.  A better cleanup, in time, is to avoid using 
these inline styles altogether, in favor of styles in a stylesheet 
somewhere.

-- Jon

On 04/26/2017 03:44 PM, Martin Buchholz wrote:
> http://stackoverflow.com/questions/11939595/leaving-out-the-last-semicolon-of-a-css-block
>
> Terminating with a semicolon consistently seems to be good practice 
> even if it's not necessary.
>
> On Wed, Apr 26, 2017 at 3:40 PM, Martin Buchholz <martinrb at google.com 
> <mailto:martinrb at google.com>> wrote:
>
>     This looks good.
>
>     jsr166 maintainers will merge into jsr166 CVS.
>
>     I'm unsure whether the ";" should be used as separator or
>     terminator.  I would have terminated every style with a ";"
>
>     On Wed, Apr 26, 2017 at 3:31 PM, Jonathan Gibbons
>     <jonathan.gibbons at oracle.com <mailto:jonathan.gibbons at oracle.com>>
>     wrote:
>
>         Please review the following conceptually simple fix to change
>         use of the align and valign attributes in table-related tags
>         to inline style attributes in the public doc comments for the
>         contents of java.base module.
>
>         This is for compatibility with HTML 5.
>
>         The change was done mechanically with the following sed
>         script, which was applied to the set of files reported by
>         "javadoc -html5" as containing  the use of the align and
>         valign attribute.
>
>         s/ align="*left"*/ style="text-align:left"/
>         s/ align="*center"*/ style="text-align:center"/
>         s/ ALIGN="*CENTER"*/ style="text-align:center"/
>         s/ align="*right"*/ style="text-align:right"/
>         s/ valign="*top"*/ style="vertical-align:top"/
>         s/ valign="*bottom"*/ style="vertical-align:bottom"/
>         s/ style="\([^"]*\)" style="\([^"]*\)"/ style="\1; \2"/
>
>         The first six lines change the variants of align and valign
>         into the corresponding style attributes. And, because there
>         were some instances where a tag had both align and valign, the
>         final line of the script merges two instances of the style
>         attribute into a single instance.
>
>         This covers files in the following packages:
>
>         java.base java/io
>         java.base java/lang
>         java.base java/lang/reflect
>         java.base java/math
>         java.base java/nio/charset
>         java.base java/text
>         java.base java/time/chrono
>         java.base java/time/format
>         java.base java/util
>         java.base java/util/concurrent
>         java.base java/util/regex
>
>         JBS: https://bugs.openjdk.java.net/browse/JDK-8179367
>         <https://bugs.openjdk.java.net/browse/JDK-8179367>
>         webrev: http://cr.openjdk.java.net/~jjg/8179367/webrev/
>         <http://cr.openjdk.java.net/%7Ejjg/8179367/webrev/>
>
>         -- Jon
>
>
>



More information about the core-libs-dev mailing list