Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

Automation of enabling/disabling features like autoprefixer #94

Open
MoOx opened this issue Jul 16, 2014 · 16 comments
Open

Automation of enabling/disabling features like autoprefixer #94

MoOx opened this issue Jul 16, 2014 · 16 comments
Labels

Comments

@MoOx
Copy link
Contributor

MoOx commented Jul 16, 2014

Like autoprefixer we could use caniuse-db with a list of browsers to know what features to use or not.
This is not essential now, but it will became when browser start to implement all features we got here.

myth --browsers="last 1 version, > 1%, Explorer 7" input.css output.css
var converted = myth(css, {browsers: ["last 1 version", "> 1%", "Explorer 7"})

We need to check @ai works :)

@ianstormtaylor
Copy link
Contributor

Would be nice to ideate a bit on the syntax to make it cleaner feeling, since things like 'last 1 version' aren't grammatically correct

@MoOx
Copy link
Contributor Author

MoOx commented Jul 16, 2014

Indeed. latest version should easily replace lastest 1 version :)

@MoOx
Copy link
Contributor Author

MoOx commented Jul 16, 2014

@ianstormtaylor You don't like "Internet Explorer" being transformed to "Explorer" right ?

@ai
Copy link
Contributor

ai commented Jul 16, 2014

@ianstormtaylor we can fix grammar issues in Autoprefixer too to have common API.

@ai
Copy link
Contributor

ai commented Jul 16, 2014

@MoOx Issue is only in latest version?

@MoOx
Copy link
Contributor Author

MoOx commented Jul 16, 2014

We should definitly make a common module to ask caniuse-db for a reponse.

@MoOx
Copy link
Contributor Author

MoOx commented Jul 16, 2014

@ai not sure, we should check all possibilities you have :)

@ai
Copy link
Contributor

ai commented Jul 16, 2014

@MoOx yeap, common module will be nice.

But there is one problem. last 2 versions select not all browsers, because there are a lot of minor browsers. It is OK for Autoprefixer, but bad for common module. Maybe last 2 versions of popular?

@ai
Copy link
Contributor

ai commented Jul 16, 2014

BTW, there are also awesome Autopolyfiller, which need browser selection too. /cc @azproduction

@MoOx
Copy link
Contributor Author

MoOx commented Jul 16, 2014

What about including request feature directly to caniuse-db ?

@ai
Copy link
Contributor

ai commented Jul 16, 2014

@MoOx now caniuse-db is just database. Maybe separated module will be better. caniuse-browsers?

@MoOx
Copy link
Contributor Author

MoOx commented Jul 16, 2014

caniuse will do the trick (since it's a question: "can I use X on [Y]"). Maybe we can contact the maintainer of https://www.npmjs.org/package/caniuse to see if we can get it ?

@ai
Copy link
Contributor

ai commented Jul 16, 2014

/cc @Fyrd

@MoOx
Copy link
Contributor Author

MoOx commented Jul 16, 2014

I've contacted @wuchengwei to see if we can get the npm name :)

@azproduction
Copy link

@ai as far as I know, there is no data in caniuse about ES features and their quality. However, I think it is possible to mix @kangax tables with caniuse to create an awesome features db!

@ai
Copy link
Contributor

ai commented Jul 16, 2014

@azproduction I remember, that you ask for some separated browser selector, for quieries like last 2 versions. What you uses now?

papandreou added a commit to assetgraph/assetgraph-builder that referenced this issue Jul 23, 2014
Used to control autoprefixer and the splitCssIfIeLimitIsReached transform.

Removes support for --autoprefix (autoprefixer is now used if and only if --browsers is specified)

Currently requires autoprefixer to be available. Keeping an eye on segmentio/myth#94
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants