summaryrefslogtreecommitdiff
path: root/test/indent
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-10-20 12:36:34 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-10-20 12:36:34 -0400
commitbc0e9e47b645ecd8da86eb8ae5810ebf2fd62b97 (patch)
treecd9aff1fe18c0593b94e03523debeb124685ffd3 /test/indent
parent57fe1632f0dc40042dfb6593f81f451165987637 (diff)
downloademacs-bc0e9e47b645ecd8da86eb8ae5810ebf2fd62b97.tar.gz
* lisp/textmodes/css-mode.el (scss-mode): New major-mode.
(css-mode-syntax-table): Use d style comment, to ease the scss case. (css-ident-re): Allow things like @-moz-keyframes. (scss--hash-re): New const. (css--font-lock-keywords): New function, extracted from css-font-lock-keywords. (css-font-lock-keywords): Use it. (scss-mode-syntax-table, scss-font-lock-keywords): New vars. (scss-smie--not-interpolation-p): New function. (css-smie--forward-token, css-smie--backward-token): Use it. (css-mode): Remove left-over code. * test/indent/scss-mode.scss: New file. * test/indent/css-mode.css: Add a few uneventful examples.
Diffstat (limited to 'test/indent')
-rw-r--r--test/indent/css-mode.css10
-rw-r--r--test/indent/scss-mode.scss57
2 files changed, 67 insertions, 0 deletions
diff --git a/test/indent/css-mode.css b/test/indent/css-mode.css
index 4dbab06975c..564ac16f954 100644
--- a/test/indent/css-mode.css
+++ b/test/indent/css-mode.css
@@ -1,7 +1,17 @@
+/* asdfasdf */
+
.xxx
{
}
+article[role="main"] {
+ width: 60%;
+}
+
+/* asdfasdf */
+@foo x2 {
+ bla:toto;
+}
.x2
{
foo: bar;
diff --git a/test/indent/scss-mode.scss b/test/indent/scss-mode.scss
new file mode 100644
index 00000000000..7a29929efca
--- /dev/null
+++ b/test/indent/scss-mode.scss
@@ -0,0 +1,57 @@
+// Comment!
+
+nav {
+ ul {
+ margin: 0; /* More comment */
+ padding: 0;
+ list-style: none;
+ }
+
+ li { display: inline-block; }
+
+ a {
+ display: block;
+ padding: 6px 12px;
+ text-decoration: none;
+ }
+}
+nav ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+nav li {
+ display: inline-block;
+}
+
+nav a var
+{
+ display: block;
+ padding: 6px 12px;
+ text-decoration: none;
+}
+
+$name: foo;
+$attr: border;
+p.#{$name} var
+{
+ x#{$attr}-color: blue;
+}
+article[role="main"] {
+ $toto: 500 !global;
+ float: left;
+ width: 600px / 888px * 100%;
+ height: 100px / 888px * 100%;
+}
+
+@import 'reset';
+
+@mixin border-radius($radius) {
+ -webkit-border-radius: $radius;
+ -moz-border-radius: $radius;
+ -ms-border-radius: $radius;
+ border-radius: $radius;
+}
+
+.box { @include border-radius(10px); }