In terms of Flexbox, this guide in the React Native documentation is BY FAR the best guide I've seen anywhere. It tells you just the right amount of things you need to know to be productive. https://reactnative.dev/docs/flexbox It's not React Native specific. It works for web-based CSS as well.
That's a nice site to learn. This is my goto reference (they even sell it as a poster). https://css-tricks.com/snippets/css/a-guide-to-flexbox/
Learn CSS
181–190 of 196 posts
Re: Learn CSS
#182I've essentially made my career with CSS. I've been hired solely because of my CSS skills. I am continually surprised when I interview engineers proficient in Angular / React / JS but they cannot even do a basic full page layout (think header, footer, and two adjacent content areas in the middle ). Anyone starting from scratch to try to get a career in web dev become great at CSS - its a niche no one seems to want to…
I unironically love CSS and I once got a contract gig doing nothing but CSS for a PWA, because their front-end dev didn't want to or couldn't (can't remember) do it
Re: Learn CSS
#183I've always wanted to write my own CSS guide, because (in my experience) people are rarely focused on the right thing when they're writing CSS. Developers (especially junior) think that if it looks right, that it is right, and they're done. But CSS is not just specifying how something looks, you are also very much specifying visual behavior , not just appearance. Content is dynamic, layouts change at different breakp…
> Or, using absolute position to, say, anchor a close button to the top right of an element. Sure, the way you did it happened to put it visually in the right spot, but it's not actually in the right spot according to the layout engine because its offset parent is not the element you're trying to anchor it to, so if other content gets put in there eventually, it will be in the wrong spot. I'm absolutely guilty of thi…
Re: Learn CSS
#184Unless I'm mistaken, a subject is missing from this course: media queries. It is briefly mentioned int the "Grid layout" chapter, because one can build a responsive row/column by using functions like `minmax()`, but there are many cases where media queries are still needed. Outside of this course, web.dev has several articles about this.
Re: Learn CSS
#185Looks great! Small pet peeve regarding tutorials: When learning a new technology I don't care about the headaches people had 20 years ago. My first concern is how I use the technology and what it can do for me. The section about layout starts with: " In the early days of the web, designs more complex than a simple document were laid out with elements. Separating HTML from visual styles was made easier when CSS was wi…
I do. This really puts things into context for me. If I don't get that when learning something, I will look for the answers later. So I'm very happy when it's right there to begin with.
Re: Learn CSS
#186Earlier quoted context omitted.
History can be important, but I don't see what knowing that developers used to (ab)use for layout explains about modern CSS. By all means, include historical context if it helps explain why something works the way it does, but otherwise drop it. And while backwards compatibility remains a concern for browser vendors, it's much less of a concern for web developers nowadays given the vast majority of users are using au…
I resent the "(ab)" in "(ab)use tables for layout"... it was all we had AND was still better at vertically centring things until Flexbox arrived!
to create margins.It is like using a screwdriver to knock in a nail because you don't have a hammer - better than nothing, but not what a screwdriver is designed for.
Re: Learn CSS
#187Earlier quoted context omitted.
History can be important, but I don't see what knowing that developers used to (ab)use for layout explains about modern CSS. By all means, include historical context if it helps explain why something works the way it does, but otherwise drop it. And while backwards compatibility remains a concern for browser vendors, it's much less of a concern for web developers nowadays given the vast majority of users are using au…
I'm confused why the web standards don't include something like a version header for JS and CSS. That's an easy way to eliminate cruft and silo the logic in the browser engines.
Re: Learn CSS
#188Earlier quoted context omitted.
History can be important, but I don't see what knowing that developers used to (ab)use for layout explains about modern CSS. By all means, include historical context if it helps explain why something works the way it does, but otherwise drop it. And while backwards compatibility remains a concern for browser vendors, it's much less of a concern for web developers nowadays given the vast majority of users are using au…
tables are still relevant for layout if you work with email at all. In fact, if you want to be able to do email well, you have to be able to do layout like it was 10-20 years ago. There's also lots of legacy code out there to be working with, and sometimes the "old way" of doing it is still better than the new way. A pet peeve of mine is seeing flexbox everywhere, when a simple 'display: inline-block' might work. In…
Re: Learn CSS
#189Looks great! Small pet peeve regarding tutorials: When learning a new technology I don't care about the headaches people had 20 years ago. My first concern is how I use the technology and what it can do for me. The section about layout starts with: " In the early days of the web, designs more complex than a simple document were laid out with elements. Separating HTML from visual styles was made easier when CSS was wi…
Nah, I think the history is important, especially for web development where modern tech stacks are technologies built on technologies built on technologies, and pretty much everything has to be backwards compatible. I've run into so many situations while learning web development where a design decision seems like nonsense until later when I learn about the history of how it evolved. First example that comes to mind i…
Re: Learn CSS
#190Earlier quoted context omitted.
This is amazing. Did y'all use any kind of static site generator or documentation tool (e.g. Antora) or was it hand rolled?
All of web.dev is open source. Here's the directory [1] for the Learn CSS content. The site is all based on Eleventy [2]. I don't know if Rob (engineering lead [3]) and team did any funny stuff for the Learn CSS infrastructure in particular but you can ping him on Twitter for questions. [1] https://github.com/GoogleChrome/web.dev/tree/main/src/site/c... [2] https://www.11ty.dev/ [3] https://twitter.com/rob_dodson