specificity
Advanced tools
Comparing version 0.1.0 to 0.1.1
{ | ||
"name" : "specificity", | ||
"version" : "0.1.0", | ||
"version" : "0.1.1", | ||
"description" : "Calculate the specificity of a CSS selector", | ||
"keywords" : "CSS, specificity", | ||
"keywords" : ["CSS", "specificity"], | ||
"homepage" : "https://github.com/keeganstreet/specificity", | ||
@@ -7,0 +7,0 @@ "author" : { |
@@ -8,3 +8,3 @@ # Specificity Calculator | ||
```js | ||
SPECIFICITY.calculate('ul#nav li.active a'); // [{ specificity: '0,1,0,0' }] | ||
SPECIFICITY.calculate('ul#nav li.active a'); // [{ specificity: '0,1,1,3' }] | ||
``` | ||
@@ -16,3 +16,3 @@ | ||
var specificity = require('specificity'); | ||
specificity.calculate('ul#nav li.active a'); | ||
specificity.calculate('ul#nav li.active a'); // [{ specificity: '0,1,1,3' }] | ||
``` | ||
@@ -25,3 +25,3 @@ | ||
```js | ||
SPECIFICITY.calculate('ul#nav li.active a, body.ie7 .col_3 h2 ~ h2'); | ||
SPECIFICITY.calculate('ul#nav li.active a, body.ie7 .col_3 h2 ~ h2'); // [{ specificity: '0,1,1,3' }, { specificity: '0,0,2,3' }] | ||
``` | ||
@@ -31,3 +31,3 @@ | ||
The `specificity.calculate` function returns an array containing a result object for each selector input. The result objects contain the following properties: | ||
The `specificity.calculate` function returns an array containing a result object for each selector input. Each result object has the following properties: | ||
@@ -45,4 +45,6 @@ * `selector`: the input | ||
result = specificity.calculate('ul#nav li.active a'); | ||
console.log(result); | ||
/* result = | ||
[ { | ||
@@ -59,2 +61,3 @@ selector: 'ul#nav li.active a', | ||
} ] | ||
*/ | ||
``` |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
7099
0
57