HACKER Q&A
📣 PaulHoule

Semantic” CSS Framework?


When I make applications on my own account that are server-side rendered I frequently use CSS to style things in a way similar to what I think CSS was intended for initially, that is, I apply styles to meaningful parts of the document (e.g. "div.statusbar", "table.postlisting th".)

Frequently I work on these things on and off for months or years and eventually they become a hot mess.

I'm looking for something that will help me have some discipline. I do not like BEM, Tailwind CSS, Bootstrap, and other frameworks that want to impose alien structures on CSS. I like the intention of SASS/SCSS but don't like the idea of complicating my build system. (I like the idea of CSS Nesting as it works in Chrome but Firefox doesn't have it yet unfortunately. I want to use the latest features but I need support for Firefox and Mobile Safari with Chrome as a distant third.) I would consider using a JS polyfill and I am using jinja2 template so anything I can bake into my python back end (maybe compile & cache compiled CSS) would be possible.

Any advice for frameworks or other organizing principles?


  👤 transfire Accepted Answer ✓
Constraint based style sheets?

https://gss.github.io/guides/ccss

I think this has great potential and I have been meaning to try it myself although I find the syntax somewhat wanting.