From 1efaa1d66b9bc51284c7cac4477f45c9bde4fcfb Mon Sep 17 00:00:00 2001 From: Simen Heggestøyl Date: Sun, 10 May 2020 14:44:26 +0200 Subject: Allow underscores in CSS variable names * lisp/textmodes/css-mode.el (css-nmchar-re): Allow underscores in variable names (and in identifiers in general). * test/manual/indent/css-mode.css: Add some examples of variable names with underscores in them. * test/manual/indent/less-css-mode.less: Add some examples of variable names with underscores in them. * test/manual/indent/scss-mode.scss: Add some examples of variable names with underscores in them. --- test/manual/indent/less-css-mode.less | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/manual/indent/less-css-mode.less') diff --git a/test/manual/indent/less-css-mode.less b/test/manual/indent/less-css-mode.less index 36c037450cc..b40a2362e28 100644 --- a/test/manual/indent/less-css-mode.less +++ b/test/manual/indent/less-css-mode.less @@ -1,3 +1,13 @@ +@var-with-dashes: #428bca; +@var_with_underscores: 10px; +@_var-starting-with-underscore: none; + +body { + background: @var-with-dashes; + padding: @var_with_underscores; + display: @_var-starting-with-underscore; +} + .desktop-and-old-ie(@rules) { @media screen and (min-width: 1200) { @rules(); } html.lt-ie9 & { @rules(); } -- cgit v1.2.3