I know this question is very old but still relevant.
We now have the ability to provide an "Alternative text after /
" to the content
attribute (ex: content: '✅' / 'ticked'
) .
Be sure to add a fallback as a first line in order not to break the compatibility.
Using attr
it allows you to pass translations from the HTML element.
<li data-bullet="tick">Lorem ipsum dolor</li>
li:before {
content: '✅';
content: '✅' / attr(data-bullet);
}
Sources:
See "Alternative text after /
" in the compatibility table: https://developer.mozilla.org/en-US/docs/Web/CSS/content#browser_compatibility