Add some styles for code and image figures

These elements are created with the figures/image shortcodes from the old site.
Make them wide, and give them XL block margins.

Along the way, make sure that any element with only an <img> child has a line height
of 1 to avoid a weird gap below the image.
This commit is contained in:
Eryn Wells 2024-10-11 16:37:24 -07:00
parent 49f5a90813
commit b112558914
3 changed files with 19 additions and 6 deletions

View file

@ -61,7 +61,7 @@ p + p {
/* Figures */
{{- $elementsWithXLBlockMargins := "blockquote, .figure--image, .figure--youtube, .codeblock, .highlight, table" -}}
{{- $elementsWithXLBlockMargins := "blockquote, .figure--code, .figure--image, .figure--youtube, .codeblock, .highlight, table" -}}
p + :is({{ $elementsWithXLBlockMargins }}) {
margin-block-start: var(--space-xl);