diff --git a/resources/skins.vector.styles/typography.less b/resources/skins.vector.styles/typography.less index 26043b2a8..24c9ae614 100644 --- a/resources/skins.vector.styles/typography.less +++ b/resources/skins.vector.styles/typography.less @@ -145,12 +145,18 @@ pre, } p { - // T351754 Use padding to avoid margin collapsing between adjacent
elements - // creating an effective margin-bottom: 1em - padding-bottom: 0.5em; - // Top margin is needed because many elements rely on adjacent
elements - // for extra spacing, i.e. lists and headings - margin: 0.5em 0 0 0; + margin: 0.5em 0 1em 0; + } + + p + ul, + p + ol, + p + table, + p + dl, + p + blockquote { + // Inline elements should have 0.5em total top spacing + // Use negative margin to account for 1em bottom margin on paragraphs + // This will not work for floated elements + margin-top: -0.5em; } blockquote { @@ -166,12 +172,6 @@ pre, margin-bottom: 0; } } - - ul, - ol { - // Override default spacing so that lists entirely rely on adjacent sibling elements for spacing - margin-top: 0; - } } // T335625 - Move siteSub into common.less to prevent it from being feature-flagged