-
I assume this is a very specific edge case. I #daretoask anyway. I need a
So in .context::before,
{
content: "…";
display: inline;
margin: 0;
margin-block: 0;
margin-inline: 0;
}
div.context > p {
display: inline;
margin: 0;
margin-block: 0;
margin-inline: 0;
} However, this renders space between … and text because Framework seems to generate: <div class="context">
<p>aloha</p>
</div> I can get rid of the space by removing any white space between the <div class="context"><p>text</p></div> But as the html is generated, there seems to be nothing that I can do (apart from generating it myself, e.g. using a Page Loader). How to get rid of that space? P.S. all the margin settings may be superfluous. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Presumably the technique you’re using is Markdown within opening and closing HTML blocks, like this: <div class="context">
aloha
</div> In this case, you can’t prevent the whitespace from being introduced around the resulting paragraph elements. But, you could apply the pseudoelement to the first child instead of the container: <style>
.context > :first-child::before {
content: "…";
}
</style> Alternatively, you can avoid Markdown and instead using a single HTML block. Then you can control the generated HTML more precisely and avoid the undesired whitespace. But you won’t be able to use Markdown within the container. <div class="context"><p>aloha</p></div> |
Beta Was this translation helpful? Give feedback.
Presumably the technique you’re using is Markdown within opening and closing HTML blocks, like this:
In this case, you can’t prevent the whitespace from being introduced around the resulting paragraph elements. But, you could apply the pseudoelement to the first child instead of the container:
Alternatively, you can avoid Markdown and instead using a single HTML block. Then you can control the generated HTML more precisely and avoid the undesired whitespace. But you won’t be able to use Markdown within the container.