Last modified: 2014-06-16 17:20:46 UTC
https://en.wikipedia.org/wiki/User:TheDJ/bgcolor https://en.m.wikipedia.org/wiki/User:TheDJ/bgcolor The TD cell should be green. But in the mobile site it is red. This is because bgcolor is deprecated and unlike style="background-color" does not override stylesheets. I think that this is an argument to make the parser/sanitizer start automatically converting these wikicode attributes into proper inline style attributes.
The background is white for me. Minerva (the mobile skin) sets the background for *everything* to "none". CSS always overrides old style HTML attributes. There was a discussion on wether to convert all HTML attributes to CSS, but I can't find it. It mainly concerned tables. Since these are deprecated, the question should be wether to 1) allow and leave untouched, 2) convert to CSS, or 3) cease support and remove them from the whitelist.
Yeah this is a sort of perennial discussion on this front. basically 'bgcolor' is valid in the wikitext sense, but obsolete as HTML output. So if we can make it 'better' HTML, we probably should. Alternatively we could start thinking about a way to deprecate it in wikitext, but that isn't that easy to do.
Surely Minerva could do `[bgcolor] { background-color: attr(bgcolor); }` on top of its reset CSS?
We've already had the code to "rewrite" deprecated HTML elements and attributes and it was reverted because it did more harm than good, see bug 40632.
(In reply to Bartosz Dziewoński from comment #3) > Surely Minerva could do `[bgcolor] { background-color: attr(bgcolor); }` on > top of its reset CSS? There is a truckload of other old attributes that will need to be handled as well. If we want to keep supporting obsolete attributes, translation to CSS is the only option. Do we have some official specification of what attributes wiki markup is supposed to support?
@Bartosz, well I think we at LEAST should fix the reset skin of the mobile website indeed, to take this problem into account. But I also never agreed with the full revert of the cleanuppresentationalattributes patch. I still think that for the majority of the attributes it was a sane approach. For align perhaps less so, but that is just one of them. The bigger problem is that we really should start thinking about what we want to do, if obsolete html is starting to cause problems in a newer skin like mobile, we can be sure that there are going to be other places where this is going to be a problem. Support it in wikicode -> make it work by translating it to modern inline css form. Don't support it in wikicode -> think about a strategy to get the content fixed.
We really shouldn't be supporting these deprecated and obsolete standards at all. Attempts to save should return to the user that they attempted to use EE element or FF attribute and that is no longer valid and they should use MM element or NN attribute instead. Doing this will prevent people from maintaining these bad coding habits and when browser do flat out stop supporting them there won't be a bunch of new pages with all kinds of funky funk going on. The only thing left will be mostly archives and rarely used templates or pages which are less likely to be an issue. Once the inflow of these elements is stopped, then cleaning out the backlog of the old ones that should be updated will be possible. There is an ongoing RfC about this on enwiki at [[Wikipedia:Village pump (proposals)#RfC: Should deprecated/invalid/unsupported HTML tags be discouraged?]] that would allow softening the transition that should be happening to eliminate these elements from MediaWiki wikis. This discussion shouldn't prevent or hold back discussion on making the core warn/refuse these bad elements as this is something that should be addressed on every project.
Hey everyone, I have no opinion on this. I just knew it was done poorly before and backfired, and wanted anyone who would try doing this again to know this as well. By all means go ahead, and don't CC me on patches. :P
The previous attempt was rushed. I'm willing to take a stab, but I like to inventory which tags and attributes are currently supported, and which ones we want to support.