]> git.eshelyaron.com Git - emacs.git/commitdiff
Treat ":root" as a css-selector
authorTom Tromey <tom@tromey.com>
Tue, 17 Jan 2017 00:17:38 +0000 (17:17 -0700)
committerTom Tromey <tom@tromey.com>
Tue, 17 Jan 2017 22:35:39 +0000 (15:35 -0700)
* lisp/textmodes/css-mode.el (css--font-lock-keywords): Recognize bare
":root" as selector.

lisp/textmodes/css-mode.el

index 872d115f29f4bc64b3acbc1f41bdebd0b2ceb033..c81c3f62e16b7755c93472d61b3da830a5093930 100644 (file)
@@ -666,6 +666,8 @@ cannot be completed sensibly: `custom-ident',
     ;; Variables.
     (,(concat "--" css-ident-re) (0 font-lock-variable-name-face))
     ;; Selectors.
+    ;; Allow plain ":root" as a selector.
+    ("^[ \t]*\\(:root\\)\\(?:[\n \t]*\\)*{" (1 'css-selector keep))
     ;; FIXME: attribute selectors don't work well because they may contain
     ;; strings which have already been highlighted as f-l-string-face and
     ;; thus prevent this highlighting from being applied (actually now that