Page MenuHomePhabricator

Drop "position: absolute" on p-logo element
Open, NormalPublic

Description

The #mw-panel (sidebar) is at top: 160px
The logo is at top: -160px
This looks hacky so I set it to 0

Event Timeline

Golopotw created this task.Jul 8 2017, 5:32 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 8 2017, 5:32 PM
Golopotw updated the task description. (Show Details)Jul 8 2017, 5:37 PM

Change 364028 had a related patch set uploaded (by Golopotw; owner: Golopotw):
[mediawiki/skins/Vector@master] Drop position:absolute of logo.

https://gerrit.wikimedia.org/r/364028

Golopotw renamed this task from Logo icon: replace position:absolute with normal css box flow. to Drop position:absolute of logo.Jul 8 2017, 6:07 PM
Krinkle renamed this task from Drop position:absolute of logo to Drop "position: absolute" on p-logo element.Jul 13 2017, 4:40 AM
Krinkle triaged this task as Normal priority.
Krinkle added a project: Technical-Debt.
Krinkle assigned this task to Golopotw.
Krinkle added a project: MonoBook.

Change 364934 had a related patch set uploaded (by Krinkle; owner: Krinkle):
[mediawiki/skins/MonoBook@master] Remove "position: absolute" and z-index from #p-logo

https://gerrit.wikimedia.org/r/364934

Volker_E added a comment.EditedJul 13 2017, 6:47 AM

Tested applied styles in IE 7 (identical rendering to before):

TheDJ awarded a token.Jul 13 2017, 8:39 AM

Change 364028 merged by jenkins-bot:
[mediawiki/skins/Vector@master] Remove position: absolute from #p-logo element

https://gerrit.wikimedia.org/r/364028

Change 364934 merged by jenkins-bot:
[mediawiki/skins/MonoBook@master] Remove position: absolute and z-index from #p-logo

https://gerrit.wikimedia.org/r/364934

matmarex closed this task as Resolved.Jul 17 2017, 4:45 PM
matmarex removed a project: Patch-For-Review.
Legoktm reopened this task as Open.Jul 20 2017, 8:52 PM
Legoktm added a subscriber: Legoktm.

This was reverted in MonoBook, see T171195: Site logo is no longer clickable in monobook.

The z-index removal may have caused div#column-content to cover #p-logo.

Indeed. The margin-left for .mw-body on div#content.mw-body is reserving all transparent space on the left of the content area, thus preventing the logo from being a click target.

What I don't understand is... why does this only affects the logo anchor, and not the regular anchor links in the sidebar?

I've created an isolated test case here:
https://codepen.io/Krinkle/pen/pwMKVe?editors=1100

First idea without intense testing: Using position: relative; instead with z-index.

Indeed. This appears to fix it, but I don't quite know why.