Skip to content

Conversation

@ViliusS
Copy link

@ViliusS ViliusS commented Dec 29, 2025

Because blocks are using paragraph tags, top and bottom block padding is dependent on the margin of the global <p> style configuration. For example, in learn2-git theme global paragraph configuration has a top/bottom margin of 1.7rem (~30px). Current CSS matches this, however it becomes an issue when one wants to use markdown blocks in other themes, where different font is used, let's say, Arial with 1.2rem for paragraph top/bottom margins.

We solve this issue by resetting margin of paragraph tags inside notices to zero and purely relying just on padding to provide a spacing.

This correctly fixes a padding issue mentioned in #5 and later reverted in #6 .

This also fixes an issue mentioned in #24 with current default themes where there is no right padding:
image

Because blocks are using paragraph tags, top and bottom block padding is
dependant on the margin of the global `<p>` style configuration. For
example, in learn2-git theme global paragraph configuration has a
top/bottom margin of 1.7rem (~30px). Current CSS matches this, it
becomes an issue when one wants to use markdown blocks in other themes,
where different font is used with, let's say, Arial with 1.2rem for
paragraph top/bottom margins.

We solve this issue by reseting margin of paragraph tags inside notices
to zero and purely using just padding to provide a spacing.
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