CSS is often the most overlooked and messy portion of web applications. Rather than implementing an application with LESS, SASS, or Stylus, I propose embracing the new style standard and an exciting new specification for CSS modules.
1. The Future of Style SheetsThe Future of Style Sheets
Bret Little - @little_bret
http://bretlittle.surge.sh
http://slides.com/bretlittle/future-of-css
4. Is the code readable?
Is it easy to change or extend?
Is it decoupled from other parts of the
application?
Will it scale?
Is it good?
http://engineering.appfolio.com/2012/11/16/css-architecture/
8. The Dark side of LESS / SassThe Dark side of LESS / Sass
Overzealous @extend
Unrestrained Nesting
Too easy to do the
wrong thing
Brevity vs
Understanding
10. var postcss = require('postcss');
module.exports = postcss.plugin('PLUGIN_NAME', function (opts) {
opts = opts || {};
// Work with options here
return function (css, result) {
// Transform CSS AST here
};
});
PostCSS Plugin