1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
emacs/test/manual/indent/less-css-mode.less
Simen Heggestøyl 1efaa1d66b 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.
2020-05-10 14:57:22 +02:00

39 lines
718 B
Text

@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(); }
}
header {
background-color: blue;
.desktop-and-old-ie({
background-color: red;
});
}
.e(@name, @rules) {
&__@{name} { @rules(); }
}
.m(@name, @rules) {
&--@{name} { @rules(); }
}
.btn {
.e(span, { // .btn__span
display: inline-block;
});
.m(primary, { // .btn--primary
background: blue;
});
}