1.0.1 • Published 8 years ago

sort-specificity v1.0.1

Weekly downloads
4
License
ISC
Repository
github
Last release
8 years ago

Sort Specificity

Sort css selector for specificity

NPM npm version Build Status

Instalation

npm install sort-specificity

Usage

var sortSpecificity = require('sort-specificity')
var input = [
  "a .d b#foo",
  "b",
  "a .d b.d",
  "a b",
  "a .d b",
]
var result = sortSpecificity(input)

result is

[
  "a .d b#foo",
  "a .d b.d",
  "a .d b",
  "a b",
  "b"
]

Input raw css

You can input raw css.

var css = fs.readFileSync("./fixtures/sample.css", "utf-8")
var result = sortSpecificity(css) // parsed css selctor
1.0.1

8 years ago

1.0.0

8 years ago

0.3.0

8 years ago

0.2.0

9 years ago

0.1.1

10 years ago

0.1.0

10 years ago