Last modified: 2012-09-29 17:40:20 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 T20722, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 18722 - Wrapper id consistency across skins
Wrapper id consistency across skins
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.15.x
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Trevor Parscal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-08 22:00 UTC by Happy-melon
Modified: 2012-09-29 17:40 UTC (History)
3 users (show)

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


Attachments

Description Happy-melon 2009-05-08 22:00:16 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?
Comment 1 Brion Vibber 2009-05-08 22:05:14 UTC
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...
Comment 2 Daniel Friesen 2012-09-29 17:29:39 UTC
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.
Comment 3 Jesús Martínez Novo (Ciencia Al Poder) 2012-09-29 17:40:20 UTC
Since MW1.19 there's already a #mw-content-text ID applied on all skins on the article content.

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


Navigation
Links