summaryrefslogtreecommitdiff
path: root/lisp/textmodes/css-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes/css-mode.el')
-rw-r--r--lisp/textmodes/css-mode.el12
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el
index 96a82baa56c..b3a41d3822c 100644
--- a/lisp/textmodes/css-mode.el
+++ b/lisp/textmodes/css-mode.el
@@ -54,6 +54,14 @@
'("charset" "font-face" "import" "media" "namespace" "page")
"Identifiers that appear in the form @foo.")
+(defconst css-bang-ids
+ '("important")
+ "Identifiers that appear in the form !foo.")
+
+(defconst scss-bang-ids
+ '("default" "global" "optional")
+ "Additional identifiers that appear in the form !foo in SCSS.")
+
(defconst css-descriptor-ids
'("ascent" "baseline" "bbox" "cap-height" "centerline" "definition-src"
"descent" "font-family" "font-size" "font-stretch" "font-style"
@@ -236,8 +244,8 @@
(defun css--font-lock-keywords (&optional sassy)
`((,(concat "!\\s-*"
- (regexp-opt (append (if sassy '("global"))
- '("important"))))
+ (regexp-opt (append (if sassy scss-bang-ids)
+ css-bang-ids)))
(0 font-lock-builtin-face))
;; Atrules keywords. IDs not in css-at-ids are valid (ignored).
;; In fact the regexp should probably be