csscomb.js icon indicating copy to clipboard operation
csscomb.js copied to clipboard

LESS: CSSComb parse error when using variable in selector

Open richmilns opened this issue 5 years ago • 0 comments

With LESS, I'm seeing a parse error when LESS variables are used in selectors. Example LESS:

    @mni: .main-nav__item;

    .main-nav-active {
        max-height: 500px;
        
        @{mni} {
            opacity:1;
        }
    }

Output from VSCode:

[CSSComb]

Parsing error: /Users/me/Sites/example/less/modules/nav.less
Please check validity of the block starting from line #31
CSScomb Core version: 4.3.0

29 |         max-height: 500px;
31*|         @{mni} {
32 |             opacity:1;
33 |         }

Syntax: less
Gonzales PE version: 4.2.4

I believe this is valid LESS code as it compiles correctly.

Let me know if you would like any more info. Thanks!

richmilns avatar Apr 30 '20 14:04 richmilns