I don’t think you want to use 1em, 1em is to the font-size of your h2.feature, so you want to either use .75em or 1.25em depending on if you want it larger or smaller.
Keep in mind em is relative to the element, so when you say 1em, you are saying, same font-size as the element. That is why you want to use .75em or 1.25em depending on if you want it larger or smaller.
Yes. In that case 1em in ::after is equivalent to 2em, the element’s initial font size. So you would still want to use .75em for smaller, or 1.25em for larger.
Just another point I would like to raise about this method.
Is there some special reason why you are using a pseudo element to append the heading, as this does not make much sense to me?
As far as the html is concerned, the second part of the heading does not exist, I doubt that bots and screen readers will “see” it. Perhaps that is the intention. But if however all you are wanting to do is have a second line of smaller text, there are better ways to do that.
In this example I used a <span> element to separate the second part of the heading.
Some find the cascading nature of the em unit confusing. The other option is to use the rem unit.
That is relative to the text size at the root of the document, rather than being relative to the parent object of an element like the em. So some find that easier to work with.
The way you did the original css would have worked with rem, as you expected a size of 1 to bring the text back to the “normal” font size, as opposed to not changing the size, as em does.
Personally I like to use em and use it almost exclusively, but some prefer the rem, it’s down to your preference.
You’re 110% right! I want that keyword rich phrase to get picked up by the bots. So, I went ahead and changed to the pseudo element to the span approach that you suggested.