csstools / csstools/postcss-advanced-variables

Could not resolve variable $c within #{$c}__label{ ... }

Open
#91 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
144
Forks
33
PR merge metrics
No merged PRs in 30d

Description

Hi all,

I'm switching over from SCSS in BEM-notation to PostCSS and run into the following issue:

I declare the main selector as a $c: &; so I can use it throughout the rest of my .pcss file, but when I try to access it within something else inside that selector like #{$c}__label{ ... } I get the message:

``` Internal server error: postcss-advanced-variables: /Users/xxx/Sites/xxx/resources/styles/07-components/_primary-nav.pcss:13:16: Could not resolve the variable "$c" within "#{$c}__label"```

Here's a screenshot of what I'm trying to do: [screenshot](https://share.getcloudapp.com/Koudo1Wn)

Don't know if anyone has any tips to achieve something like this? Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.