-
I've noticed that a feature from the tailwind prose class isn't working as expected when using the article block. When you wrap some text in a div and apply the prose class, the first child loses it's top margin and the last text element loses it's bottom margin. But in peak the text you type is wrapped in a div inside the prose div, so the margin correction isn't applied. Text inside div:
Text without being wrapped in a div
As you can see when the text elements are directly inside the prose class, the margins are correct. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Good find. I think this should work: .prose :where(.prose > div > :first-child):not(:where([class~="not-prose"] *)) {
margin-top: 0;
}
.prose :where(.prose > div > :last-child):not(:where([class~="not-prose"] *)) {
margin-bottom: 0;
} |
Beta Was this translation helpful? Give feedback.
Good find. I think this should work: