Page MenuHomePhabricator

PopupWidgets: Suppress top padding on first elements in popup
Closed, ResolvedPublic

Description

Coming from AdvancedSearch, we also need to take care about :first-child top padding in PopupWidgets:

image.png (674×464 px, 59 KB)

Event Timeline

Change 436350 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[oojs/ui@master] themes: Remove top distance (margin & padding) from first elements

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

We must not suppress padding. This will mess up the layout if something uses border+padding, or if it has large padding-top to display a splash image (like the VE welcome dialog).

Looks like MediaWiki sets padding-top on h1-h6 elements (in mediawiki.skinning/elements.css), which is unfortunate, but it should be fixed in MediaWiki if we think that's wrong (and I think it is, it should be margin).

My personal opinion on this is:

  • Removing the padding from core might be the "right" thing to do, but is unlikely to happen because it will most probably have to many negative consequences.
  • I'm fine with having something like .mw-advancedSearch-container .oo-ui-popupWidget h6 { padding-top: 0; } in the Advanced-Search code. Why? Because the fact that a popups content starts with <h6> is pretty much exclusive to AdvancedSearch. We are styling this <h6> anyway. An additional padding-top does not make this code worse, in my opinion.

Sure, a generic solution would be really nice.

Volker_E claimed this task.
Volker_E added a subscriber: Prtksxna.
Vvjjkkii renamed this task from PopupWidgets: Suppress top padding on first elements in popup to wybaaaaaaa.Jul 1 2018, 1:06 AM
Vvjjkkii removed Volker_E as the assignee of this task.
Vvjjkkii raised the priority of this task from Low to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from wybaaaaaaa to PopupWidgets: Suppress top padding on first elements in popup.Jul 2 2018, 8:46 AM
CommunityTechBot assigned this task to Volker_E.
CommunityTechBot lowered the priority of this task from High to Low.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.

Change 541706 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/extensions/AdvancedSearch@master] Override core's tooltip heading top padding

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

Change 436350 abandoned by VolkerE:
themes: Remove top distance from PopupWidget's first elements

Reason:
for I550509

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

Change 541706 merged by jenkins-bot:
[mediawiki/extensions/AdvancedSearch@master] Override core's tooltip heading top padding

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