Flexbox froggy helped a lot with some practical experience that translated fairly well to my regular work.
There are other games like this that I haven’t gotten to yet, including one for flexgrid. Once I clear all the levels in flexbox froggy I’m going to try the flexgrid game.
Then after that I’m going to spend time with bootstrap and tailwind since the last time I really used them was back in my more junior days when I barely knew anything at all about css.
CSS is super powerful and I love how much you can do with it. I’m still scratching the surface, too. I’ve been using it for years for common things as a full-stack dev but it’s only really the last six months that I’ve really begun to stretch myself with it.
The power it has for animations is impressive too, for example. I spent a lot of time on just that and flexbox and flexgrid and it made me go from hating CSS to really liking it.
I'm only now dipping my feet into front-end development, and I'm avoiding all frameworks[1], but to play with CSS I made this: https://rundata.co.za/~lelanthran/JustTryIt/
It's incomplete, it's not good for testing layouts, etc ... but it was useful to me when I didn't know what the defaults did.
(I should perhaps rewrite it now to be more complete and less cruft-filled - this was written when I knew less about JS and CSS than I do now).
[1] No special reason - there are too many, and most of them seem bloated for what I need. I'm sure react solves real problems, but I find it's shorter to solve my problems using whatever I've already written and understood than learning a whole new framework.
Enjoy the rewrite! I love that feeling of rewriting something with new knowledge and finding all kinds of gains while doing so.
If nothing else, the image at the top is more confusing than it needs to be, the old one was much better. It didn't used to refer to edges, but the margin/border/etc itself, which is what you're actually dealing with in CSS.
The box model combined with the box-sizing page makes probably the biggest WTF people have with CSS pretty obvious IMO (why "width: 100%" is bigger than 100%): https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing
If the reason for that makes sense to you, I think that makes you well above average among frontend devs. All the new stuff like flex and grid is still built on the box model after all.
I recently ran create-next-app with Tailwind, and the default example output page has several divs with 600+ characters of tailwind class names. Each! Without word wrap most of the page's style information is way off the right side of the screen, and with word wrap the page source is mostly class names. Is this how tailwind pages are meant to look?
Also, with tailwind the page's style information is all in class names - which are plaintext, with no syntax highlighting or code hints or linter errors. Do people using tailwind maintain styles that way, or is there a quasi-mandatory plugin or something?
The only obvious benefit I see for tailwind is that style rules are tied directly to the markup they modify. But if I use any SFC framework like vue or svelte, I can have scoped CSS with the style rules right next to the markup, and I also get legible style rules, code hints, CSS variables, and everything else. What is it that tailwind makes better?
https://adamwathan.me/css-utility-classes-and-separation-of-...
But doesn't that entire line of thinking disappear if one just uses scoped CSS inside components? Everything in that link assumes that all CSS rules are global, and it runs through BEM and then tailwind as a way to avoid putting component-specific rules in the global CSS file.
But if you just use a frontend framework with SFCs, you can treat each component as a module with its own local style rules. If there's no global CSS file to edit, don't BEM and Tailwind become irrelevant, since the problem they solve no longer exists?