Page MenuHomePhabricator

Babel boxes use obsolete attributes cellspacing and cellpadding (in HTML5)
Closed, ResolvedPublic

Description

The table constructed by {{#babel:}} uses the attributes cellspacing and cellpadding, which are no longer valid in HTML5 (see URL). Use (inline, in this case) CSS instead.


Version: unspecified
Severity: enhancement
URL: http://www.w3.org/TR/2012/WD-html5-diff-20120329/#obsolete-attributes

Details

Reference
bz39681

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 1:11 AM
bzimport set Reference to bz39681.

(In reply to comment #2)

Reading
http://stackoverflow.com/questions/339923/how-to-set-cellpadding-cellspacing-in-css
I wonder if it's right now a good idea to drop IE6 and IE7 support.

Would you be able to create a screenshot of what IE6/7 would look like if inline CSS were used? Some visual degradation would be acceptable.

Yes, I could do it for IE6. I haven't an IE7 install.

I offer to use border-spacing / padding attributes, like in Gerrit change #21567.

This change would also require config change, to have a px (or em) declaration.

The config change is not desirable (ie acceptable). Based On the current docs of mw:Extension:Babel, things should be backward compat wrt on-wiki configuration.

Backwards compatibility could be reached checking if the parameter is an integer, and if so, adding 'px' in CSS declaration.

I updated the code, so config change won't be needed.

It will read babel-cellpadding, babel-cellspacing, babel-box-cellpadding. babel-box-cellspacing as pixels values by default.

So a current setting like "8" for babel-cellpadding will become "8px".

Of course, if a user sets "1em" or "0", it will keep the values as is.

sumanah wrote:

https://gerrit.wikimedia.org/r/#/c/21567/ is now merged; Dereckson, is it ok to close this bug?

(In reply to comment #8)

https://gerrit.wikimedia.org/r/#/c/21567/ is now merged; Dereckson, is it ok to
close this bug?

Absolutely!