Absurd-CSS
Overview
AbsurdJS CSS preprocessor only.
Installation
npm i absurd-css
About
This is the CSS preprocessor part of the super power preprocessor AbsurdJS that contain some new features and changes and no dependencies needed. So, you could transform:
- JavaScript, JSON, CSS to CSS
Usage
var api = ; api; api;
Features
- Tiny and without cli usage.
- Added
scope
method for scoped styles. - Added
unmorph
method to disable the morphs. - Refactored methods, plugins and molecules to a sigle files.
- Support for custom delimiters in dynamic-css morph and value replacement in CSS.
Changes
compile
method no longer accept a path as a parameter, just callback and options.import
,importCSS
andrawImport
no longer accept a path or path array as parameter, you must give it a content or array of contents.- In Webpack or Browserify environment, you can import CSS in CSS
@import
at-rule, with the corresponding loader or transformation. Otherwise is disabled. - Only
jsonify
anddynamic-css
morph are avaliables.
Examples
Scoped style
var api = ; apiscope'#scope'; api; api;
Unmorph
var api = ; api; api; var rules = api; // => compile rules to a json var scope = '#scope': rules ; // store json in a scope object api; // adding again as scope style api;
Delimiters
var api = ; // this delimiters are the default, this is just an example. apidelimiters = '{%' '%}'; api; api; api;
Tip for atoms
var api = ; api; api;