Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mahendran-balaji/css-specificity-hierarchy

CSS-Specificity-Hierarchy
https://github.com/mahendran-balaji/css-specificity-hierarchy

Last synced: about 6 hours ago
JSON representation

CSS-Specificity-Hierarchy

Awesome Lists containing this project

README

        

# CSS Specificity Hierarchy

Every CSS selector has its place in the specificity hierarchy.

There are four categories which define the specificity level of a selector:

```html
Inline styles - Example:


IDs - Example: #navbar
Classes, pseudo-classes, attribute selectors - Example: .test, :hover, [href]
Elements and pseudo-elements - Example: h1, ::before
```

```html


#demo {color: blue;}
.test {color: green;}
p {color: red;}

Mahendran Balaji

```