Skip to content

Commit 841ae37

Browse files
committed
Support paragraph style in the generated <p> with the wpautop function
1 parent 3d6de98 commit 841ae37

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/scss/06-blocks/core/_paragraph.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,14 @@ p {
1515
}
1616
}
1717
}
18+
19+
// For paragraphs generated by wpautop function (eg. excerpts), paragraphs are wrapped in a div with the class "is-style-large" for example. We need to apply the text style to the p elements inside the div.
20+
div {
21+
@each $style in $paragraphs {
22+
&.is-style-#{$style} {
23+
& > p:where(:not([class*="is-style-"])) {
24+
@include text(#{$style});
25+
}
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)