6 ms·
My favorite new CSS feature is the Custom Highlight API, which allows you to style arbitrary (and potentially overlapping!) text ranges without needing to creat
by aragonite 3y ago
My favorite new CSS feature is the Custom Highlight API, which allows you to style arbitrary (and potentially overlapping!) text ranges without needing to create ad hoc <span> element nodes. MDN Demo:
https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_Highlight_API#result https://developer.mozilla.org/en-US/docs/Web/API/CSS_Custom_...
Hopefully VSCode will be able to switch to using this API for syntax highlighting in the near future for a performance boost, instead of sticking to the current superposition approach:
https://github.com/microsoft/vscode/issues/175938 https://github.com/microsoft/vscode/issues/175938
- noman-land 3y agoNot available in Firefox, it seems.
- culopatin 3y agoThis is super useful for a side project of mine. I hope I have some time soon to put it to good use