4 ms·
Wow, interesting. Could you please share more insights about why and how did you implemented this? What is the most challenging problem you got? And why would y
by huydotnet 7y ago
Wow, interesting. Could you please share more insights about why and how did you implemented this? What is the most challenging problem you got? And why would you think a typed system over a CSS framework is a good idea?
- dvkndn3 7y agoI really enjoy the static typing TypeScript brings to JS, and it always annoys me that I can't have the same in CSS. When Tailwind makes utilities-first CSS great again, I see that's when I can fill the missing piece and finally bring types to CSS! The core functionality is not really hard, thank to PostCSS. The most challenging problem is to decide whether to go with run time or compile time implementation. I chose run time first because I think: - It's easier to prove the idea to others (can even make a website to do so: typed.tw) - It's easier to try (you can throw it into most existing build system) But at the end of the day compile time is still better so I'm actually working on a webpack loader right now.
- dvkndn3 7y ago> And why would you think a typed system over a CSS framework is a good idea? It's not just any CSS framework, but only utilities-based ones. In my opinion, CSS should not be complicated. They should only be tools to decorate things, like some kind of a library, not a programming language. That's "library" part is when I think a typed system could shine, because styles are now just a list of fixed, primitive values.