Merge "Revise margin collapsing rules with new layout"

This commit is contained in:
jenkins-bot 2022-06-24 16:25:54 +00:00 committed by Gerrit Code Review
commit 0a00ad5b40

View file

@ -95,7 +95,12 @@ body {
} }
.mw-body-subheader { .mw-body-subheader {
// avoid margin collapsing by setting a height and margin-top as this will sometimes
// be empty if no indicators.
// The total of margin-top and height should be 16px. Since we're using relative units 1em=14px
// We need to set both height and margin so that the margin is not ignored.
margin-top: 1em; margin-top: 1em;
height: 2px;
} }
.mw-header { .mw-header {
@ -130,14 +135,6 @@ body {
z-index: @z-index-base; z-index: @z-index-base;
} }
// Prevents margin collapsing on first element (typically a <p>) of content.
// Custom because .mixin-clearfix() automatically appends :after to the selector
// and doesn't prevent margin collapsing.
.vector-body:before {
content: '';
display: table;
}
/* Navigation Containers */ /* Navigation Containers */
.vector-layout-legacy .mw-article-toolbar-container { .vector-layout-legacy .mw-article-toolbar-container {
// Clear the floats on #left-navigation and #right-navigation. // Clear the floats on #left-navigation and #right-navigation.