Last modified: 2012-05-27 12:52:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T38586, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 36586 - $wgCleanupPresentationalAttributes: 'align' parameter for tables is replaced with wrong CSS
$wgCleanupPresentationalAttributes: 'align' parameter for tables is replaced ...
Status: RESOLVED DUPLICATE of bug 36495
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.19
All All
: Low normal (vote)
: 1.20.0 release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-07 09:15 UTC by Edward Chernenko
Modified: 2012-05-27 12:52 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Edward Chernenko 2012-05-07 09:15:18 UTC
With $CleanupPresentationalAttributes=true (default in 1.19) 'align' parameters are replaced with 'text-align' CSS.

This works for <div>, BUT for a <table> this is wrong (since 'text-align' affects only the text inside the table, and <table align="center">...</table> has the same effect as <center><table>...</table></center>). 

I suggest that the 'align' parameters for tables should be left intact (even with $CleanupPresentationalAttributes=true).

The alternative is to replace 'align=right' and 'align=left' by 'float: (right/left)' style, and 'align=center' by wrapping the table into the <center> tag.
Comment 1 Edward Chernenko 2012-05-07 10:55:37 UTC
Probably better replacement:

align=right -> style="margin-left: auto;"

align=left -> style="margin-right: auto;"

align=center -> "margin-right: auto; margin-left: auto;"
Comment 2 Erik 2012-05-27 12:51:25 UTC
I can confirm this bug. Two other bugs were submitted for this same issue:
https://bugzilla.wikimedia.org/show_bug.cgi?id=36495
https://bugzilla.wikimedia.org/show_bug.cgi?id=37114

We can keep this one as the "main" one since a solution is suggested although I don't know enough to say if that's the best solution or not so they'll have to test it.
Comment 3 Krinkle 2012-05-27 12:52:05 UTC

*** This bug has been marked as a duplicate of bug 36495 ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links