Making CSS TypeSafe
Maintainable CSS is nearly impossible. But writing maintainable JavaScript is a fairly solved problem. Lets combine the two to make CSS maintainability an issue of the past.
The DOM style
attribute is not enough to cater for things like pseudo states and media queries. We provide a simple zero config style
function that gives you all the power of CSS with all the safety and maintainability of TypeScript / JavaScript.
TypeStyle core is actually very small (~6k gz) and you are free to use just that. However this guide and TypeStyle is designed to be approachable by both beginner and expert CSS devs. So we provide utilities that are mentioned next.
csx
Provided as a separate library (npm install csx
):
csstips
Provided as a separate library (npm install csstips
). Provides utilities for pagesetup / CSS normalization along with mixins and mixin creators.
Available easily via npm:
npm install typestyle --save
We also have a free video course based on the same content as this guide if you prefer to watch instead of reading.