kristoferjoseph / postcss-modular-scale

PostCSS plugin for adding modular scale to your styles
MIT License
53 stars 9 forks source link

postcss-import chokes on modular scale declarations #11

Closed adrinux closed 8 years ago

adrinux commented 8 years ago

Declaring scale like so:

:root {
  --ms-bases = 1;
  --ms-ratios = 1.067;
}

In a separate typography.css which I'm @importing into main.css causes an error:

typography.css:2:3: Unknown word [postcss-import]

Regardless of whether postcss-modular-scale is run before postcss-import or after.

Any suggestions for workarounds?

kristoferjoseph commented 8 years ago

Do me a favor, try it with two bases set and see if the error goes away. Thanks! I am going to be removing support for multiple bases and ratios soon.

adrinux commented 8 years ago

Sorry I switched to https://github.com/erikjung/postcss-modular-scale-unit – don't even have your module installed to test.

lkraav commented 8 years ago

hey @adrinux. as @kristoferjoseph is busy with other things, can you comment on how well https://github.com/erikjung/postcss-modular-scale-unit as worked out for you? i think will also need to go with an alternative, as this one simply doesn't work.