Specifying a color for commas, parenthesis and brackets


#1

HI - I’m playing around with making my own theme, and I’d like to figure out a way to specify colors for commas, parenthesis and brackets. Is there any way of doing this?

Thanks.


#2

I believe the following should work, in general. They might be overridden by other styles in your theme so you may want to try variations with more specificity if they don’t seem to work at first.

// brackets
.syntax--punctuation.syntax--bracket {
  color: red;
}

// quotes
.syntax--punctuation.syntax--string {
  color: green;
}

// commas
.syntax--punctuation.syntax--separator {
  color: blue;
}

#3

Oops, I included quotes rather than parentheses. This should work for parens.

.syntax--punctuation.syntax--round {
  color: cyan;
}