mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-12 01:09:20 +00:00
Merge "Make paragraph spacing 0.5em top and 1em bottom by default, handle adjacent inline elements manually"
This commit is contained in:
commit
e1a73d9956
|
@ -145,12 +145,18 @@ pre,
|
|||
}
|
||||
|
||||
p {
|
||||
// T351754 Use padding to avoid margin collapsing between adjacent <p> elements
|
||||
// creating an effective margin-bottom: 1em
|
||||
padding-bottom: 0.5em;
|
||||
// Top margin is needed because many elements rely on adjacent <p> 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
|
||||
|
|
Loading…
Reference in a new issue