Jump to content

MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
Line 403: Line 403:
}
}


/* Remove top margin and collapse stray VisualEditor paragraphs */
/* Hide stray VisualEditor <p><br></p> after infoboxes */
.mw-body-content > p:first-child {
.mw-parser-output .infobox + p:has(br) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}
 
/* Hide blank or whitespace-only paragraphs at the top of content */
.mw-body-content > p:first-child:has(br),
.mw-body-content > p:first-child:has(> span:empty),
.mw-body-content > p:first-child:has(> span[style*="display:none"]),
.mw-body-content > p:first-child:has(> span[contenteditable]) {
     display: none !important;
     display: none !important;
    margin: 0 !important;
    padding: 0 !important;
}
}