commit 9517766aab6489b55b0d72e8474680264eca64ab parent c561b4280ffd9441fd1b0d9d45020d08e0d0fcc8 Author: Benno Schulenberg <bensberg@telfort.nl> Date: Thu, 30 Jul 2020 09:21:43 +0200 syntax: css: differentiate pseudo-classes (now cyan) from comments (blue) Also, add comments, remove a duplicated ":link", and add ":checked". Diffstat:
M | syntax/css.nanorc | | | 13 | +++++++++++-- |
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/syntax/css.nanorc b/syntax/css.nanorc @@ -3,9 +3,18 @@ syntax css "\.css$" comment "/*|*/" +# First make everything red: color brightred "." +# Then everything between braces yellow: color brightyellow start="\{" end="\}" -color brightwhite start=":" end="([;^\{]|$)" -color brightblue ":active|:focus|:hover|:link|:visited|:link|:after|:before" +# Then everything after a colon white: +color brightwhite start=":" end="([;^{]|$)" + +# Pseudo-classes: +color brightcyan ":(active|checked|focus|hover|link|visited|after|before)\>" + +# Comments: color brightblue start="/\*" end="\*/" + +# Syntactic characters: color green ";|:|\{|\}"