Last modified: 2012-09-29 17:40:20 UTC
Currently, when trying to increase the specificity of CSS declarations; there is no consistent ID that can be used across all skins. Declarations like this: #content span.PDFlink a, #mw_content span.PDFlink a{ background: url("http://upload.wikimedia.org/wikipedia/commons/thumb/2/23/Icons-mini-file_acrobat.gif/15px-Icons-mini-file_acrobat.gif") center right no-repeat; padding-right: 17px; } Need to include two separate ids to work in all skins, because there's such a mishmash of wrapper classes: chick: globalWrapper, content, bodyContent standard: content, article cologneblue: content, article modern: mw_content, mw_contentholder monobook: globalWrapper, content, bodyContent nostalgia: content simple: globalWrapper, content, bodyContent As you can see, #content is closest to being universal, but not so. If two IDs are needed (for higher specificity), the difficulty increases. I'm not sure how best to resolve this; adding progressively more wrappers is probably *not* the best solution. Adding #content to the modern skin would probably be worthwile, however. Thoughts?
I'm assigning this to Trevor on the usability team. Trevor, we were talking about this the other day. :) Maintaining consistent item IDs/classes where possible makes it easier to deal with things reliably, though of course there are limits on how consistent you can be. We should be able to be a little more consistent on new skin designs...
IDs of regions should be up to the individual skin. We shouldn't make any restrictions on that. It wouldn't make for a proper skin system. For css specificity skins should be opting in to the new class="mw-body" to denote elements where content-area styling should start to apply (eg: external link icons) and increase specificity. So I'm going to boldly WONTFIX this.
Since MW1.19 there's already a #mw-content-text ID applied on all skins on the article content.