Fix indentation rule in css-mode

* lisp/textmodes/css-mode.el (css-smie-rules): Fix indentation of
brackets in presence of pseudo-selectors.  (Bug#21328)
This commit is contained in:
Simen Heggestøyl 2015-08-28 19:36:10 +02:00
parent fdd095d2fd
commit c6af816aff
2 changed files with 6 additions and 1 deletions

View file

@ -344,7 +344,7 @@
(`(:elem . arg) 0)
(`(:list-intro . ,(or `";" `"")) t) ;"" stands for BOB (bug#15467).
(`(:before . "{")
(when (smie-rule-hanging-p)
(when (or (smie-rule-hanging-p) (smie-rule-bolp))
(smie-backward-sexp ";")
(smie-indent-virtual)))
(`(:before . ,(or "{" "("))

View file

@ -36,3 +36,8 @@ a.b:c,d.e:f,g[h]:i,j[k]:l,.m.n:o,.p.q:r,.s[t]:u,.v[w]:x { /* bug:20282 */
div.x3
{
}
article:hover
{
color: black;
}