Skip to content

Make MD element paragraphs <p> tags, tighter, with more spacing.#5

Open
jimbojw wants to merge 1 commit intolovvtide:masterfrom
jimbojw:style-paragraph-spacing
Open

Make MD element paragraphs <p> tags, tighter, with more spacing.#5
jimbojw wants to merge 1 commit intolovvtide:masterfrom
jimbojw:style-paragraph-spacing

Conversation

@jimbojw
Copy link

@jimbojw jimbojw commented Jun 28, 2023

This small change has three effects:

  1. Rather than using generic <div> elements for paragraphs of text, it uses the semantic <p> tag.
  2. When comment is truthy, the paragraphs' margin-bottom is increased from 4px to 1em. By setting the margin in em units, it will be proportional to the font size (14px).
  3. When comment is truthy, the paragraphs' line-height is decreased from 21px to 1.4 (unitless). By using a unitless value for line-height, it will be proportional to the font size (1.4 X 14px = ~19.6px).

The result of these changes is that lines of text in paragraphs are closer together, while blank lines between paragraphs are wider. This groups related text more closely and makes paragraphs more clear.

However, because this change moves away from explicit pixel sizes, it may be controversial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant