Yet Another CSS Preprocessor.
$ npm install -g yacp
when use in HTML:
$ bower install client-yacp
/* Import your other CSS files */;}/* Placeholder selector for `extend` */%
Compiled with the following command:
$ yacp input.css output.css
/* Expand foo.css *//* Inherited in `.attBox` */
calc(), a feature to do simple calculations
YACP provide Bind ruleset syntax.
Selectors rounded by
() cannot cascade.
Using this feature, you can define encapsulated ruleset.
()/* Error *//* Error */()
One of fault of existin CSS Preprocessor is compiling any code which don't have syntax error.
This is 'dangerous' inheritance code (Sass):
.btn-success is overwrote too, and it may cause unexpected result.
But, YACP's inheritance is safe. You can use with
Must use the placeholder selector (
%). The Ruleset defined with placeholder selector don't output as CSS code.
YACP's placeholder selector cannot cascade.
If inherited selectors have same properties, run error.
Ex (1, 2):
%/* Error */%
Using this feature, you can define private (cannot overwrite and refer from only YACP code) ruleset.
$ yacp --help
Usage: yacp [options]Options:-c, --compress use output compression-s, --strict use strict mode compile-w, --whitespace use whitespace syntax like Stylus-V, --versions output the version number-h, --help output usage information
YACP's strict mode allow only class and pseudo-elements selector.
Following selectors cannot compile.
Using this option, you can keep specificity constant, so its code will be more maintenable.
Using with css-whitespace.
The MIT License (MIT)
Copyright (c) 2014 Masaaki Morishita