Skip to content

Commit

Permalink
add rich-text mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisben committed Dec 12, 2022
1 parent 69ae7ea commit 2dbc141
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
1 change: 0 additions & 1 deletion assets/sass/_theme/design-system/layout.sass
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ body
// *
// transition-duration: 0s !important

main
&:not(.page-with-blocks)
padding-bottom: $spacing-section-y
Expand Down
14 changes: 10 additions & 4 deletions assets/sass/_theme/design-system/typography.sass
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,17 @@ p
small, .small
@include small

@mixin rich-text
h1, h2, h3, h4, h5, h6, p
margin-top: 2em
&:first-child, meta + &
margin-top: 0

.rich-text
@include rich-text

[itemprop="articleBody"]
h1, h2, h3, h4, h5, h6
margin-block-start: 2em
&:first-child, meta + &
margin-block-start: 0
@include rich-text

@mixin blockquote
margin: 0
Expand Down
2 changes: 1 addition & 1 deletion layouts/persons/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
</div>
{{ end }}
{{ if (partial "GetTextFromHTML" .Content) }}
<div>
<div class="rich-text">
{{ partial "PrepareHTML" .Content }}
</div>
{{ end }}
Expand Down

0 comments on commit 2dbc141

Please sign in to comment.