https://github.com/davidkpiano/sass-specificity
Sass Specificity Calculator
https://github.com/davidkpiano/sass-specificity
Last synced: about 1 month ago
JSON representation
Sass Specificity Calculator
- Host: GitHub
- URL: https://github.com/davidkpiano/sass-specificity
- Owner: davidkpiano
- Created: 2014-11-23T19:18:50.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-11-23T20:21:17.000Z (over 10 years ago)
- Last Synced: 2025-02-25T02:43:08.015Z (3 months ago)
- Language: CSS
- Size: 137 KB
- Stars: 11
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Sass Specificity
================**Sass (SCSS) Specificity Calculator**
Utility to calculate (and display) specificity or specificity map of any valid simple/compound/complex selector via mixin or function. If given a [selector list](http://dev.w3.org/csswg/selectors4/#selector-list), the highest specificity map/value will be displayed.## Usage
```scss
@include 'path/to/_specificity';// As a mixin
figure .out > select.or[specificity] {
@include specificity; // specificity: 0, 3, 2;
// specificity-value: 770;
}// As a function
a.head #of + time {
$this-specificity-map: specificity(&); // 1, 1, 2
$this-specificity-value: specificity(&, true); // 65794
}
```