Skip to content

css.lang (and family): Improve embeddability

The main goals of these changes are to:

  • Allow CSS highlighting inside <style> elements of HTML files to end wherever a </style> tag is present
  • Allow PHP code (<?php ... ?>) inside of PHP files to be properly highlighted inside <style> elements

This also allows embedding languages to disable error highlighting in CSS (for invalid @charset rules and :not() pseudo-classes), e.g. for CSS code listings inside of documentation.

Merge request reports