Background
Followup to https://phabricator.wikimedia.org/T360917
The amount of churn on this work makes me feel like I should re-iterate the intentions behind the design changes. The intentions behind the change in vertical spacing between paragraphs are two fold:
- The current designs in Vector and Minerva don't have enough spacing between paragraphs. The hard edges at the tops and bottoms of paragraphs are important signposts for the eye when a reader is scanning down a page quickly. It's important to include enough spacing between paragraphs to differentiate paragraph breaks from line breaks.
- Headers were equidistant to the paragraphs above and below them. At a glance, it was unclear whether a header belonged to the paragraph above it or below it, which created more issues with information hierarchy. The solution to this is that headers should be physically closer to the text that they are headers for.
User story
As a user of a wiki I want the whitespace to be consistent and per the intended design. As an editor the markup and spacing of the page should be implemented in an expected way.
As a Wikipedia reader, I want consistent spacing and information hierarchy in articles where headers are closer to the text that they are heading and there is enough spacing between paragraphs to differentiate one from another at a glance.
Requirements
- There are 4 flavours of content breaks in an article:
- Line break: vertical spacing = line-height value
- Paragraph break: 1 em
- half paragraph break: 0.5 em
- Section break: 1.5em
- Paragraphs breaks should measure 1em of computed space, which scales depending on the size of the text selected in the Appearance menu.
- Headers should have 1.5em of space between the top of the header text and the bottom of the element above it.
- Lists, images, tables, block quotes, and other "inline" elements that are indented from the main body of text should have 0.5 em of space above and 1 em of space below them.
- If an inline element appears at the end of a paragraph, it should have 1 em of space after it if the element below it is anything other than a heading.
- If the element below the inline item is a heading, the inline item should have 1.5em of space beneath it.
- exception : If a heading is placed directly below another heading, only 1em of space should be between the elements. There's no need for the extra 0.5em of space in this case.
Impacted projects
All projects
Acceptance criteria
- Spacing between paragraph and other elements is according to the design