Open wkeese opened 9 months ago
This is tricky and requires a bit of thought because of how local variables are being handled.
Not sure if this is a problem that goes away if I switch to using the postcss processor. Probably worth doing that first rather than updating the existing parsing.
A postcss processor is an interesting idea, although for layout variables IIRC it converts them to raw values? It used to use CSS variables but I think you discontinued that, so that (at least with some configurations) it converts
padding: spacing.$spacing-05
into
padding: 1rem
(or something like that). In which case, the stylelint wouldn't be able to do its job.
@wkeese I meant to refer to the postcss value parser, which I think just produces a tree from the value.
Either way, with regards to this issue, it is not a quick fix due to the way the SCSS values are currently being processed.
This works fine with no lint errors:
However, this fails:
Is it possible to support both (without throwing an error)?