https://github.com/ebkr/javascript-stylesheets
Write CSS using JavaScript without a framework.
https://github.com/ebkr/javascript-stylesheets
Last synced: 3 months ago
JSON representation
Write CSS using JavaScript without a framework.
- Host: GitHub
- URL: https://github.com/ebkr/javascript-stylesheets
- Owner: ebkr
- Created: 2017-05-29T14:56:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-05-29T16:04:38.000Z (almost 8 years ago)
- Last Synced: 2025-01-14T12:29:54.408Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# JS-CSS (JavaScript-Stylesheets)
Write CSS using JavaScript without a framework.### Why?
There are a few reasons I can think of.
1. Modularity - You can customise elements outside of the CSS area, and reuse those parts in other areas.
2. Compatibility - Works on IE and Edge, removes the need for a preprocessor to use variables.
3. Conditionals - Deliver custom themes, or style specific elements before delivering content.JS-CSS doesn't try to bloat your files with unnecessary objects. All it's doing is parsing your JS and translating it to CSS.
### What can it do?
JS-CSS currently supports all methods and selectors, as well as media queries (new).
If you do require anything else, it's always possible to overwrite using a CSS file.[You can't nest items]
### But the file size is larger!
Well, considering it's ~2KBs in size, there shouldn't be any noticeable performance hit. The code also delivers minified\* CSS to the webpage.
Isn't it also worth all those extra possibilities?