diff --git a/lesscpy/plib/identifier.py b/lesscpy/plib/identifier.py index b698a62..3851480 100644 --- a/lesscpy/plib/identifier.py +++ b/lesscpy/plib/identifier.py @@ -110,6 +110,8 @@ class Identifier(Node): if any((n for n in name if n == '&')): for n in name: if n == '&': + if parsed[-1].endswith(']'): + parsed.extend(' ') if parent[-1] == ' ': parent.pop() parsed.extend(parent) diff --git a/lesscpy/test/css/ws.css b/lesscpy/test/css/ws.css index 5f699bd..9d897dd 100644 --- a/lesscpy/test/css/ws.css +++ b/lesscpy/test/css/ws.css @@ -40,3 +40,6 @@ @font-face { src: url('x') format('e'), url('r') format('s'); } +fieldset[disabled] .form-control { + cursor: not-allowed; +} diff --git a/lesscpy/test/css/ws.min.css b/lesscpy/test/css/ws.min.css index 8c1dd5f..981c99c 100644 --- a/lesscpy/test/css/ws.min.css +++ b/lesscpy/test/css/ws.min.css @@ -10,3 +10,4 @@ .no_final_semi1{color:yellow;color:white;} @media all{html{padding:src('no semi in media block');}} @font-face{src:url('x') format('e'),url('r') format('s');} +fieldset[disabled] .form-control{cursor:not-allowed;} diff --git a/lesscpy/test/less/ws.less b/lesscpy/test/less/ws.less index d95dfa8..54f839d 100644 --- a/lesscpy/test/less/ws.less +++ b/lesscpy/test/less/ws.less @@ -61,3 +61,8 @@ color: yellow; src: url('x') format('e'), url('r') format('s'); } +.form-control { + fieldset[disabled] & { + cursor: not-allowed; + } +}