Skip to content

matype/css-annotation-block

Repository files navigation

css-annotation-block Build Status

A css-annotation module to return the specific nodes

Install

$ npm install css-annotation-block

Example

input.css:

/* @start foo */

.class {
   font-size: 12px;
}

/* @end foo */
var fs = require('fs')
var cssAnnotationBlock = require('css-annotation-block')

var css = fs.readFileSync('input.css', 'utf-8').trim()

cssAnnotationBlock(css)
/* Return: [ { name: 'foo', nodes: [ [Object] ] } ] */

name is the name of its block. nodes is PostCSS's Node object.

License

The MIT License (MIT)

Copyright (c) 2015 Masaaki Morishita

About

A css-annotation module to return the specific nodes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published