diff options
author | Simen Heggestøyl <simenheg@gmail.com> | 2017-02-02 20:05:32 +0100 |
---|---|---|
committer | Simen Heggestøyl <simenheg@gmail.com> | 2017-02-04 20:19:54 +0100 |
commit | f6ff7bb1fcd062fe4ebf6c89890524110501583e (patch) | |
tree | e7ca0ad1e5595f7be4f75c53ed0091d09d55f72a /test | |
parent | ff4dd0d39c3f5dfb8f4988f840c2c05621db32db (diff) | |
download | emacs-f6ff7bb1fcd062fe4ebf6c89890524110501583e.tar.gz |
Fix indentation of multiline CSS property values
* lisp/textmodes/css-mode.el (css-smie-grammar): Give colons belonging
to properties higher precedence.
(css--colon-inside-selector-p, css--colon-inside-funcall): New
functions for helping SMIE during tokenization.
(css-smie--forward-token, css-smie--backward-token): Distinguish
colons belonging to properties from other colons.
* test/manual/indent/css-mode.css: Add tests for the changes above.
* test/manual/indent/scss-mode.scss: Ditto.
Diffstat (limited to 'test')
-rw-r--r-- | test/manual/indent/css-mode.css | 27 | ||||
-rw-r--r-- | test/manual/indent/scss-mode.scss | 18 |
2 files changed, 45 insertions, 0 deletions
diff --git a/test/manual/indent/css-mode.css b/test/manual/indent/css-mode.css index 3a00739bfc4..0845c02c299 100644 --- a/test/manual/indent/css-mode.css +++ b/test/manual/indent/css-mode.css @@ -43,3 +43,30 @@ article:hover { color: black; } + +/* bug:13425 */ +div:first-child, +div:last-child, +div[disabled], +div::before { + font: 15px "Helvetica Neue", + Helvetica, + Arial, + "Nimbus Sans L", + sans-serif; + font: 15px "Helvetica Neue", Helvetica, Arial, + "Nimbus Sans L", sans-serif; + transform: matrix(1.0, 2.0, + 3.0, 4.0, + 5.0, 6.0); + transform: matrix( + 1.0, 2.0, + 3.0, 4.0, + 5.0, 6.0 + ); +} +@font-face { + src: url("Sans-Regular.eot") format("eot"), + url("Sans-Regular.woff") format("woff"), + url("Sans-Regular.ttf") format("truetype"); +} diff --git a/test/manual/indent/scss-mode.scss b/test/manual/indent/scss-mode.scss index e1ec90a5299..d2a4f5cc1d1 100644 --- a/test/manual/indent/scss-mode.scss +++ b/test/manual/indent/scss-mode.scss @@ -74,3 +74,21 @@ $list: ( ('e', #000000, #fff) ('f', #000000, #fff) ); + +// bug:13425 +div:first-child, +div:last-child { + @include foo-mixin( + $foo: 'foo', + $bar: 'bar', + ); + + font: 15px "Helvetica Neue", Helvetica, Arial, + "Nimbus Sans L", sans-serif; + + div:first-child, + div:last-child { + font: 15px "Helvetica Neue", Helvetica, Arial, + "Nimbus Sans L", sans-serif; + } +} |