4 ms·
I genuinely hated using CSS each time I tried prior to ~2015. The point where that started changing for me was the introduction of Flexbox; the previously avail
by westoncb 5y ago
I genuinely hated using CSS each time I tried prior to ~2015. The point where that started changing for me was the introduction of Flexbox; the previously available layout models seemed to have no real coherence or logic behind them, depended on the memorization of disconnected tricks.
Even with Flexbox it's taken a number of years using CSS regularly to get to a point where I've now previously encountered most things I need to do which aren't straightforward derivations from the basic rules of behavior (e.g. even something simple like getting absolute positioning relative to immediate parent to work, or how to make arbitrary elements scrollable/non, or how to auto-truncate text with an ellipsis).
But at this point, it feels awesomely powerful. I've been awed in recent history at how rapidly I can create even novel/complex UI's; the experience is partly of hitting green lights over and over, improbably (which says something about the less fun stages I had to go through prior). But it's not just that; coming from working with desktop and mobile finite widget set GUI toolkits, the expressiveness via CSS is extensive by comparison (and, separately, the one-way-dataflow/functional-reactive style of development common in modern web dev feels excellent for connecting components to backing models).
It's also just quite a bit of fun. Combine the wide-ranging expressiveness with rapid-feedback workflows like editing from browser dev tools (or with HMR and live-updating through webpack)—writing CSS and watching sleek, novel UIs come together can be pretty enjoyable these days.
Could a better system be designed so that I wouldn't have had to go through the long journey I did, while still ending with something highly expressive and great for experts to use? I often wonder but haven't been able to think of an alternate design that would be a fundamental improvement.
- rambambram 5y ago> It's also just quite a bit of fun. Agree! I always liked CSS, it got better and better, and the real fun for me started when I found out all the different color names. For one little side project I forced myself to only use color names, it turned out pretty nice.
- codeptualize 5y agoAh yeah good old floats. It was all about knowing the clear tricks, not sure I could still do it these days haha. Agree, it was a lot harder. But even that was a lot easier then making layouts with tables, or frames haha, so I didn’t mind, it already felt like a massive improvement. But yeah flex is great, I also really enjoy grid. Similar tricky to get started with but insanely powerful. You describe it very well; that expressiveness is what’s really enjoyable, and pretty much impossible to find elsewhere. I think it’s maybe just a professional tool, hard to start with but once you get over the initial hurtle it becomes very powerful. In that sense it’s not that different from learning any programming language. It’s a good question if it could be easier, I’ve also done that exercise of “how else” I think the problem might be the complexity and messiness of ui and layout, it’s not css, it’s the layout. I think it could and will be easier though, not as something totally different, but simply improving what’s there; basically continuing the path it’s already been on for the past decades. I’m truly enjoying it today and excited for what’s to come!
- westoncb 5y ago> that expressiveness is what’s really enjoyable, and pretty much impossible to find elsewhere. I've often thought it's because CSS is lower-level, more like a tool for creating UI libraries (similar to writing e.g. OpenGL directly vs a higher-level scene graph lib built on top of it)—but when you want to make something unique, there's really no competition. > I think it could and will be easier though, not as something totally different, but simply improving what’s there; basically continuing the path it’s already been on for the past decades. Seems likely to me too.