Page MenuHomePhabricator

Vector breaks display of ===head===
Closed, ResolvedPublic


Author: conrad.irwin

While this problem isn't solvable easily - it would be trivially mitigated by using a different id for #head. (Ideally one that isn't such a common word).

See [[wikt:WT:RFC]] for an example (in vector skin), the word "head" is in the top-right, obscuring the navigation, instead of where it should be.

Version: unspecified
Severity: minor



Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:07 PM
bzimport set Reference to bz23597.

head === gets id="head", but vector defines a different head id.

The solution would be to rename vector class, to something like vector-head, skin-head....

conrad.irwin wrote:

You can hack the visual error by updating the selector to "div#head" in main-ltr.css, I'm not sure if that's good enough - or whether that wants to be done too?

Fixed in r66646 using the suggestion from comment #2 for #head and a few other IDs.

And r66670 for monobook.

It is still invalid html, though.

ayg wrote:

The general problem is bug 7356. This is why *all* new id's should be prefixed with "mw-". "head" is not a new id, of course, so it didn't follow this policy. Prefixing with "mw-" means collision by accident is very unlikely, and if it does happen, we can force user-added id's to not start with "mw-" by adding some extra prefix.

There are still lots of other ways to get id conflicts, of course, like



Title 2

or just <span id="foo"></span><span id="foo"></span>. There are various bugs open for this, but in general, avoiding all duplicate id's is impractical.

"head" is not a new id, of course, so it didn't follow this

I'd say it is. Vector hasn't even been released.
I vote for changing it, even if it breaks some user scripts at wikimedia projects.

ayg wrote:

Oh, that's right, it is a new id. In my opinion, it should simply be changed to column-one like Monobook. Was "column-one" a good choice of id? No. Is it the one we've been using for five years? Yes. The contents don't match exactly, but put it this way: if you use "column-one", some scripts and styles that affect column-one will break. If you use "head", then *all* scripts and styles that affect column-one will break. Seems like a pretty clear tradeoff to me. But I've said this before.

If Vector really wants its own id for this, at least do mw-head. Not only are no conflicts likely, it's also much more greppable.

We could change it to mw_head, which is the one modern has been using for ages (it uses all underscores, though)

ayg wrote:

Few enough people use Modern that I'd prefer to avoid the stylistic inconsistency. We use hyphens everywhere in classes and id's.

Then we might try to change the mw_ to mw- at modern, too (for 1.17), There are also other 2 insttances: mw_trackbacks and mw_content.
It could go with the skin reestructuring, if that ever happens.