0

I am in the process of writing a VS-Code syntax extension for a small language of mine. So far, so good, but I wonder whether it is possible to style certain elements in a cross-theme fashion.


This is a general question, but my specific need may pose another distinct problem. In the target language, blank lines are significant. I would like to style any sequence of blank lines (i.e., (?<=\n)\s*\n) by drawing a single horizontal rule across this sequence. The CSS could be something likeĀ :

.blank-line::before {
    content: "";
    display: block;
    border-top: 1px dashed black;
  }

Is there any way to attach such a CSS snippet to a tmLanguage grammar? Again, this should work independently from the user theme.

Aristide
  • 3,606
  • 2
  • 30
  • 50

0 Answers0