postcss / sugarss

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

Best way to load plain CSS #39

Closed AlecRust closed 8 years ago

AlecRust commented 8 years ago

What's the best way to load plain CSS files through SugarSS?

For example it would be nice to be able to load Normalize.css from /node_modules in the main stylesheet like so using postcss-import:

@import "normalize.css"
@import "base/base.sss"
@import "components/button.sss"
etc.

The full CSS doesn't play nice when pulled in amongst SugarSS styles though, so I'm currently using postcss-normalize in my plugins to work around this.

Can SugarSS support plain CSS syntax or is there a recommended way to solve this?

1j01 commented 8 years ago

See https://github.com/postcss/sugarss/issues/33 (not really resolved)

AlecRust commented 8 years ago

Thanks @1j01. Using postcss-easy-import allows something like Normalize.css to be referenced, but unfortunately the brackets/semi-colons are duplicated when parsed with SugarSS syntax:

screenshot

ai commented 8 years ago

Ask postcss-easy-import guys, because all import happen after parsing