segmentio / myth

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

Update autoprefixer to v2.0 #75

Closed MoOx closed 10 years ago

MoOx commented 10 years ago

What do you think about that @ianstormtaylor ?

MoOx commented 10 years ago

I'll update that to 2.0 (ref #57)

ianstormtaylor commented 10 years ago

Curious to know about how much slower this makes Myth, we should have some big file sizes checks in the tests probably. What are the new features in 2.0 that we'd want?

For naming we can call the rework module itself Rework and keep the instance rework

MoOx commented 10 years ago

Just checkout the changelog https://github.com/ai/autoprefixer/blob/master/ChangeLog.md A lot has been done & it will be great to have that back. I'll run some bench before/after & use multiples concatened myth.io test case for that.

MoOx commented 10 years ago

So I just made some local test with materials from #83. Not sure how to handle that problem, since one day or another we will face the "outdated prefix stuff" issue :/

Before (using #83) github: 220ms myth.io: 15ms

After (using this branch & tests added in #83) github: 628ms myth.io: 46ms

3 times longer if we add autoprefixer 2 that use postcss.

We should:

What do you think guys ? poke @ai

ai commented 10 years ago

Unfortunately, Autoprefixer 2.0 is much smarter, that Autoprefixer 0.8. It groups properties by prefixes, works with spaces to visual cascade, etc.

MoOx commented 10 years ago

@ai did you check latest changes of @reworkcss/css ? Do you think we can find a way to make them interoperate with a map conversion ? I still don't get it why you create another css parser instead of contributing to this one :(

ai commented 10 years ago

@MoOx I think we need to use any postprocessors. If you will use only Rework processors it will become monopoly and development will be finished, as it was in Compass on Sass. There are a lot of new ideas ahead Rework and PostCSS. For example: xcss

But Rework team think to implement features, that Autoprefixer needs. But I think, it will anyway slowdown parser, so Myth benefits will be small.

ai commented 10 years ago

I have ideas to speed up parser by tokenizer (also it allows to use custom at-rules with any content), but it is only long terms plan.

MoOx commented 10 years ago

This thread is very interesting @ai. Thanks for sharing.

MoOx commented 10 years ago

So @ianstormtaylor what do you think about this ?

ianstormtaylor commented 10 years ago

Sounds good to me. Unfortunate still though, we might want to make our own prefixing rework plugin took get the speed back at some point, and would be nice to have it in Javascript anyways

ai commented 10 years ago

@ianstormtaylor there is a plan to rewrite Autoprefixer and PostCSS to ES6. But I afraid, that prefixes become to be unnecessary, when I finish :).

MoOx commented 10 years ago

Merged but I'll work asap on the ability to enable/disable features for people who cares about speed & control ( #77 ). I'll also remove the last reparsing by default & make it only if plugin is asked.

ai commented 10 years ago

Very nice! ^_^ waiting for release