一个 Node.js 的 CSS 后处理器框架:PostCSS

nf456 9年前

PostCSS 是一个 Node.js 的 CSS 后处理器框架,与 Sass/Less 相比,它完全使用 JS 控制逻辑,让 CSS 开发者可以更专注于 CSS 编写,同时还有完整的 source map 支持等特性。可以用来做 CSS 预处理、压缩/美化、编辑器插件、CSS polyfill、命令行工具等。

利用 PostCSS构建:

Tools

  • Autoprefixer adds vendor prefixes by Can I Use data.
  • BEM linter lints CSS for SUIT CSS methodology.
  • CSS MQPacker joins same media queries.
  • css2modernizr analyzes your CSS and output only used Modernizr’s settings.
  • cssnext is a transpiler (CSS4+ to CSS3) that allow you to use tomorrow’s CSS syntax today.
  • CSSWring is a CSS minifier with full source map support.
  • data-separator splits data-uri into a separate CSS file.
  • pixrem is aremunit polyfill.
  • webpcss to duplicate images in CSS to WebP for supported browsers.
  • Pleeease is a pack of various postprocessors.
  • Pleeease Filters converts WebKit filters to SVG filter for other browsers.
  • RTLCSS mirrors styles for right-to-left locales.
  • CSS Byebye explicitly removes the CSS rules that you don’t want.
  • postcss-epub to prefix ePub3 properties.
  • doiuse to lint your CSS on unsupported properties by Can I Use.
  • postcss-assets to inline files and insert image width and height.
  • ACSS Annotations based CSS processor.

Plugins



项目主页:http://www.open-open.com/lib/view/home/1420382286828