]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix indentation bug with multi-line CSS values
authorSimen Heggestøyl <simenheg@gmail.com>
Sat, 27 Jan 2018 17:03:49 +0000 (18:03 +0100)
committerSimen Heggestøyl <simenheg@gmail.com>
Sat, 27 Jan 2018 17:18:19 +0000 (18:18 +0100)
* lisp/textmodes/css-mode.el (css-smie-rules): Fix indentation of
multi-line CSS values that are separated by spaces.

* test/manual/indent/css-mode.css: Add a test case for the fix.

lisp/textmodes/css-mode.el
test/manual/indent/css-mode.css

index 7e997ac2c0f662652edff0e42e3b7133f63b190a..6bd08f5919061e5df2616c808dbdf606760ffb03 100644 (file)
@@ -1215,7 +1215,8 @@ for determining whether point is within a selector."
   (pcase (cons kind token)
     (`(:elem . basic) css-indent-offset)
     (`(:elem . arg) 0)
-    (`(:list-intro . ,(or `";" `"")) t) ;"" stands for BOB (bug#15467).
+    ;; "" stands for BOB (bug#15467).
+    (`(:list-intro . ,(or `";" `"" `":-property")) t)
     (`(:before . "{")
      (when (or (smie-rule-hanging-p) (smie-rule-bolp))
        (smie-backward-sexp ";")
index 640418b022d74611fcb67172cced0808d4d6f293..ecf6c3c0ca52f0e946499b721c0e3efb8ae31092 100644 (file)
@@ -56,6 +56,8 @@ div::before {
           sans-serif;
     font: 15px "Helvetica Neue", Helvetica, Arial,
           "Nimbus Sans L", sans-serif;
+    background: no-repeat right
+                5px center;
     transform: matrix(1.0, 2.0,
                       3.0, 4.0,
                       5.0, 6.0);