-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
evaluate write CSS with myth preprocessor #33
Comments
Hey @gasolin nice to see you agian too! Anyway i've been testing myth.io couple of months ago and i was quite satisfied but i think that being able to target specific-browser prefix is not availiable right now. (in fact one of the comments on the issue that you linked is mine :D) But, myth.io is based on rework which have differents built-in separated modules. This means that you can use myth.io I made a rudimentary script to test this out some time ago, as rework is kind of more manually work with nodeJS than myth.io wich is just running a // Dependencies
var fs = require('fs');
var rework = require('rework');
var vars = require('rework-vars')();
// Global config
var src_path = "src/";
var dist_path = "";
var dist_name = "distributionfile.css";
// Files arrangement
var css = "";
var files = [
'module-a.css',
'module-b.css',
'module-c.css',
];
// Get CSS files
files.forEach(function(key) {
css += fs.readFileSync(src_path+key, 'utf8');
});
// Rework them only with rework-vars
var converted = rework(css)
.use(vars)
.toString();
// Output CSS
fs.writeFileSync(dist_path+dist_name, converted); Hope it helps you guys on taking a step forward in the Building Blocks development :D |
Thanks @basiclines for feedback. I'd like to have the auto-prefixing integration, so we could generate |
for https://github.com/mozilla-b2g/Gaia-UI-Building-Blocks/blob/v2/style/headers.css There's https://github.com/simme/rework-importer can interpret and inline all @import css into single file. |
myth is a CSS pre-processor act like CSS polyfill
https://github.com/segmentio/myth
Looks more fit for our concerns.
Myth lets you write pure CSS while still giving you the benefits of tools like LESS and Sass. You can still use variables and math functions
benifits:
need to do:
Passing options to autoprefixer segmentio/myth#16 (@basiclines nice to see you again 😄 )
The text was updated successfully, but these errors were encountered: