Useful article. Getting started with CSS must be harder these days than it was 15-20 years ago. Not only for mobile-friendliness, but also because of the coexistence of flexbox/grid/traditional layouts. I'm wondering if the standard will ever been simplified, instead of being added more and more features.
Things I wish I’d known about CSS
21–30 of 340 posts
Re: Things I wish I’d known about CSS
#22> Using pixels (px) is tempting because they’re simple to understand: declare font-size: 24px and the text will be 24px. But that won’t provide a great user experience, particularly for users who resize content at the browser level or zoom into content. Pixels (px) in CSS are relative as well, and scale with zoom. What is the benefit of em/rem?
>What is the benefit of em/rem? They (em*) scale with the element's font size, and if you set an elements font-size itself in em, that will be relative to the parent element's font size. For example: body { font-size: 18px } .something { border: 0.1em solid black; } .something > .inner { font-size: 1.5em } If you change the font-size on body, everything on that page will re-scale seamlessly. This is most useful for t…
Re: Things I wish I’d known about CSS
#23Anybody knows a good book on CSS for ppl with a solid programming background? Every couple of years I try something and fail. Somehow the tutorial rave about the cascading on and on, and when it comes how to strategically design a good SAP working on different devices the stuff gets mute quickly.
Also zeal (dash on Mac which is paid or you can build zeal yourself like I did) has docsets for CSS which are good.
Re: Things I wish I’d known about CSS
#24Ends up to a page saying "The page you requested does not exist". ...which kinda reflects "things I wish about CSS", so 10/10.
Re: Things I wish I’d known about CSS
#25Ends up to a page saying "The page you requested does not exist". ...which kinda reflects "things I wish about CSS", so 10/10.
Its loading here. Try again :-)
But "it works differently every time I try" wouldn't have made a good CSS joke. Oh, wait.
Re: Things I wish I’d known about CSS
#26I wish the author had gone a bit further into em vs rem. I'm reading other articles on the topic but they're simply technical explanations and I'm still not clear on what features of the page are best designed using em or rem.
em is often used for the padding of elements. For example buttons that exist in different sizes.
Re: Things I wish I’d known about CSS
#27Useful article. Getting started with CSS must be harder these days than it was 15-20 years ago. Not only for mobile-friendliness, but also because of the coexistence of flexbox/grid/traditional layouts. I'm wondering if the standard will ever been simplified, instead of being added more and more features.
Backwards compatibility support will always require adding on new ways to do things and not removing stuff.
I personally find flexboxes frustrating at times and tend to limit my usage to non-grid spacing (footer columns, horizontal menus) and responsive vertical alignment.
CSS grids are pretty cool, and maybe if you were just starting out it would be easier to pick up fresh than having to unlearn floating divs.
Funny thing is that if you go back 25 years (pre-table layout era), everything was not only mobile compatible but your target viewport was 800x600 which I find the painful part of mobile compatibility these days - it's that ugly zone in-between a nice mobile/cell phone layout and having the whole desktop to work with.
Re: Things I wish I’d known about CSS
#28I’ve always thought of ch as a unit intended for monospaced fonts or languages with monospaced characters. Does anyone know of any other practical uses?
Re: Things I wish I’d known about CSS
#29https://css-tricks.com/examples/nth-child-tester/
eg. try 3n+1, 3n+2. 3n+3 and then different multipliers
Re: Things I wish I’d known about CSS
#30Useful article. Getting started with CSS must be harder these days than it was 15-20 years ago. Not only for mobile-friendliness, but also because of the coexistence of flexbox/grid/traditional layouts. I'm wondering if the standard will ever been simplified, instead of being added more and more features.
One thing that is better is the browsers adherence to standards. I spent my first years learning all IE6 rendering bugs and how to overcome them.