I have set up a new site using the Starter Stack.
In the Headline element, I added some line breaks, which also added some <p>
tags to the Content. Now due to some user agent styling
, there is unwanted margin on the <p>
tags within the Headline element.
p {
display: block;
margin-block-start: 1em;
margin-block-end: 1em;
margin-inline-start: 0px;
margin-inline-end: 0px;
}
The margin-block-end
is being overridden by the following:
.x-text-content-text>p:last-child, .x-text-content-text>ul:last-child, .x-text-content-text>ol:last-child, .x-text-content-text-primary>p:last-child, .x-text-content-text-primary>ul:last-child, .x-text-content-text-primary>ol:last-child, .x-text-content-text-subheadline>p:last-child, .x-text-content-text-subheadline>ul:last-child, .x-text-content-text-subheadline>ol:last-child {
margin-bottom: 0;
}
But the margin-block-start
is not being removed for the Headline element.
This issue is not present within the Text element as it has the following CSS added:
.m7-8.x-text > :first-child {
margin-top: 0;
}
I realise the Starter Stack probably needs some extra stylings, but I would assume the default CS element styles should cover for some of this user agent stylesheet stuff?