79662162

Date: 2025-06-11 14:35:17
Score: 0.5
Natty:
Report link

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:

Reasons:
  • Probably link only (1):
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: lbineau