An open API service indexing awesome lists of open source software.

https://github.com/nswbmw/markdown-css

add CSS to Markdown
https://github.com/nswbmw/markdown-css

Last synced: 3 months ago
JSON representation

add CSS to Markdown

Awesome Lists containing this project

README

          

### markdown-css ###

As you might expect , markdown-css is a fine choice that add some CSS styles to markdown text , and finally , it will be converted to HTML .

### Installation ###

npm install markdown-css

### Usage ###

It's unbelievably easy to use . For example :

var MC = require('markdown-css');

var result = MC("[google](http://google.com){{#f00 bold 3em}}");
console.log(result);
//=>

google

You just need to put some CSS styles between `{{` and `}}` .

### Examples ###

Here are some simple usage :

**hello world**{{#f00 3em 900}}
//=> hello world

**hello world**{{color:#0f0 2em line-height:3em}}
//=> hello world

**{{#f00 3em}}**
//=>

hello{{#00f bold 1.5em}}world


//=>

helloworld

hello{{rgb(0,255,0) italic 150%}}world


//=>

helloworld

hello world


//=>

hello world


hello world

{{#f00}}

//=>

hello world

{{#f00}}

hello world



//=>

hello world

hello {{#f00}}

world



//=>
hello

world


**hello world**{{margin[5px,10px] padding[5px,10px,8px]}}
//=> hello world

> hello {{#f00 20px}}world
//=>


hello world


### Customizable ###

The most exciting is that you can make your customized CSS Mapping, like `#000` means `color:#000` , `bold` means `font-weight:bold` . you can find them in `/lib/toCSS.js` .

### LICENSE ###

MIT