colynb / absurd

Writing your CSS in JavaScript. That's it!

Home Page:http://krasimir.github.io/absurd/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AbsurdJS

Build Status

Overview

Javascript based preprocessor. No new language, no new syntax. Write everything in plain JavaScript.

Installation

Server-side

npm install -g absurd

Client-side

<script src="absurd.min.js"></script>

What it does

AbsurdJS was started as CSS preprocessor, but later it was expanded to a HTML preprocessor. So, at the moment you could transform:

  • JavaScript, JSON, YAML, CSS to CSS
  • JavaScript, JSON, YAML to HTML

How

var api = Absurd();
api.add({
	body: {
		marginTop: "20px",
		p: {
			color: "#000"
		}
	}
});
api.compile(function(err, css) {
	// use the compiled css
});

Official site, documentation and online compilator

http://krasimir.github.io/absurd/

Resources

  • AbsurdJS fundamentals - link
  • Writing your CSS with JavaScript - link

About

Writing your CSS in JavaScript. That's it!

http://krasimir.github.io/absurd/

License:MIT License