postcss / postcss-simple-vars

PostCSS plugin for Sass-like variables
MIT License
419 stars 35 forks source link

Vars for property names #13

Closed ai closed 9 years ago

ai commented 9 years ago
a {
    $(prop): 1px;
}
ai commented 9 years ago

Fixed by @mahtd in PostCSS 5.0.5

yuezk commented 9 years ago

@ai Why this issue closed? I cloned this repo and added the following test case, but it failed. So am I wrong or the issue still exists?

it('vars for property names', function () {
    test('$prop: width; a{ $(prop): 1px; }', 'a{ width: 1px }');
});
ai commented 9 years ago

Oops, released in 1.1

CKGrafico commented 3 years ago

Am I doing something wrong?

 $a: color;

  .color {
    $(a): red;
  }
(49:5) postcss-simple-vars: ....\map-utilities.css Undefined variable $a

  47 | 
  48 |   .color {
> 49 |     $(a): red;
     |     ^
  50 |   }
  51 | }
sampullman commented 3 years ago

@CKGrafico I'm not able to reproduce, the example you posted works fine for me with version 6.0.3

CKGrafico commented 3 years ago

Finally understood my problem, I was using default postcss import and was not working, only worked to me with postcss-import plugin.

Sorry!