hudochenkov / stylelint-order

A plugin pack of order related linting rules for Stylelint.
MIT License
916 stars 61 forks source link

declaration-block-order: Support Less variables #5

Closed psixdev closed 7 years ago

psixdev commented 7 years ago

As I wrote in this comment https://github.com/hudochenkov/stylelint-order/pull/3#issuecomment-263495948, it would be nice to support Less variables. We want to describe variables in the beginning of the rules, for example.

.class {
    @variable: 10px;

    margin: @variable;

    .nested {
        ...
    }
}

I think that this problem may be solved by adding RegEx patterns to declarations config, but you can simply add a new type, like dollar-variables.

hudochenkov commented 7 years ago

Thank you for suggestion! Use new at-variables keyword for declaration-block-order in 0.3.0.