postcss / sugarss

Indent-based CSS syntax for PostCSS
MIT License
707 stars 39 forks source link

What is correct way to use @apply ? #38

Closed kbytin closed 8 years ago

kbytin commented 8 years ago

I'm using cssnext and sugarSS

Cssnext includes postcss-apply (https://github.com/pascalduez/postcss-apply)

What is correct way to use it?

:root
  --centered: 
      display: flex;
      align-items: center;
      justify-content: center;

I get error Module build failed: Error: Expected pseudo-class or pseudo-element If I use like this

:root
  --centered: {
      display: flex;
      align-items: center;
      justify-content: center; }

No errors but It doesn't work

ai commented 8 years ago

Seems like current logic is not ready for apply. I will have Internet to fix it only after July 8. Is it OK?

ai commented 8 years ago

Hm. I tested your example and everything works fine.

Could you:

  1. Remove ; from your example.
  2. Post full stack trace of error if it will not be fixed by removing ;