Pseudo-elements' content entities are converted
goodguyry opened this issue · comments
Using criticalCSS via the Grunt task, I noticed entities in pseudo-elements' content property are being converted to their associated special characters and, thus, failing to render until the external CSS file has been parsed.
Opening here because it doesn't seem particularly relevant to the Grunt task. Apologies if that's not the case. Let me know if you need additional information.
Any progress on this bug?
Is there a workaround to this issue?
Unescaping and outputting as utf8 wouldn't be a problem. If only the quotes around it would be preserved.
For now, my workaround is using a regex-replace on the file afterwards. To place quotes around unquoted single-character content:
strings in the unicode private use area that fontawesome seemingly uses:
search: /(content:\s*)([\uf000-\uf300])(\s*;)/g
replace: '$1"$2"$3'
I had a similar RegEx fix in place, but ultimately decided that was silly and switched to a different critical css package 🤐
I'm still running into this issue. :/