Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/mahendran-balaji/css-specificity-hierarchy
- Owner: Mahendran-Balaji
- Created: 2023-10-15T18:48:21.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-15T18:55:03.000Z (about 1 year ago)
- Last Synced: 2023-10-16T18:03:47.208Z (about 1 year ago)
- Language: HTML
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```