segmentio / myth

A CSS preprocessor that acts like a polyfill for future versions of the spec.
4.32k stars 131 forks source link

Is there a browser side work planned? #23

Closed tombigel closed 10 years ago

tombigel commented 10 years ago

Couldn't find any reference to this in the documentation.

It would be nice to be able to pass (in the browser) a "modern" CSS string and get back a clean CSS string.

ianstormtaylor commented 10 years ago

i could be down. would just require that all of the dependencies have component support (to make staying up to date not a hassle) which is real easy to add, and good to have anyways to be honest. rework and rework-vars already have it. deps to add support for:

and some of the deps of deps means these repos need component support too:

ai commented 10 years ago

I found, that browserify is much better, that component, because you recursively need to add component.json to all dependencies.

ai commented 10 years ago

So in 1.0 I build standalone autoprefixer.js by browserify and everything is fine.

ianstormtaylor commented 10 years ago

@ai any reason for ignoring the built file - might make sense not to and to keep it built at the current release version? so that its easier to use

ai commented 10 years ago

@ianstormtaylor I think, that repo should not contain double data.

I not often update autoprefixer.js, so it may be always outdated. Also, build file in git will make commit diff more difficult.

ai commented 10 years ago

Anyway, Autoprefixer require PostCSS (also written on Coffee) and with browserify it is easy to build standalone file: https://github.com/ai/autoprefixer/blob/master/Cakefile#L61

stevenvachon commented 10 years ago

A Bower component would be nice for use with this in Less 1.7 More info: https://github.com/segmentio/myth/issues/25#issuecomment-37884153

ianstormtaylor commented 10 years ago

don't use bower myself, but happy to accept a PR for it (assuming its just a bower.json?)

stevenvachon commented 10 years ago

It'd just be a bower.json, yes, but Myth's dependencies would need to be included as Bower does not support child dependencies. It'd pretty well have to be a separate repo.

ianstormtaylor commented 10 years ago

gotcha, yeah the myth.js in root is a standalone build for client-side use, so we can use that for bower pretty easily i think

stevenvachon commented 10 years ago

Wow, had no idea... awesome!