Automattic / juice

Juice inlines CSS stylesheets into your HTML source.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CSS counters is not supported

hjue opened this issue · comments

commented

My Input is

<style>
body {
    counter-reset: section;
}
h2::before {
    counter-increment: section;
    content:counter(section);
}
</style>
<h2> Title 1</h2>
<h2> Title 2</h2>

Juice output

image

I hope Juice output

<h2><span>1</span> Title 1</h2>
<h2><span>2</span> Title 2</h2>

If someone wants to open a PR to implement counters that would be amazing. Minimally, I'd like to fix the first and last character being cut off and the documentation being unclear that only plain text is supported for ::before and ::after.

Expecting...

The first and last character being cut off is still a problem.