Ok, the first thing I looked at is "long content" <a href="https://defensivecss.dev/tip/long-content/" rel="nofollow">https://defensivecss.dev/tip/long-content/</a>
and here they recommend to just clip it. Because who cares about content right? Who cares if the partial content you display is useless, as long as it looks good. And that's the kind of tip everyone here is applauding. I would like to say webdesign is in a sorry state nowawadays, except it was also that way 20 years ago. Maybe this "who cares about the content" attitude is inherent to web designers? Sorry if I sound blasé or cynical, but one gets tired after long enough of this.
Most of these are pure common sense if you are apt with CSS.<p>However, one problem mentioned here is vendor prefix grouping. I've never experienced this problem or seen a grouped prefix ignored by any browser. Autoprefixer doesn't even ungroup prefix rules. I even ran a grouped prefix through W3C validator and came away validated, though the article mentions it's not W3C compliant.
Suggestion for the breadcrumb example on this page (and other examples like it): <a href="https://defensivecss.dev/tip/flexbox-wrapping/#breadcrumbs" rel="nofollow">https://defensivecss.dev/tip/flexbox-wrapping/#breadcrumbs</a><p>Show the HTML and CSS for the example in plain text below the example - saves me from firing up the browser inspector tools, which aren't available if I'm browsing on my phone.
Previous discussion: <a href="https://news.ycombinator.com/item?id=29504784" rel="nofollow">https://news.ycombinator.com/item?id=29504784</a><p>Not the same exact link but same author. Looks like he turned his post into a full-blown site.
I figured I would share this CSS variable technique I learned here. Tying DOM events into becoming CSS variables can be very powerful.<p><a href="https://dom-event-to-css-variable.glitch.me/" rel="nofollow">https://dom-event-to-css-variable.glitch.me/</a><p><a href="https://github.com/pseudosavant/dom-event-to-css-variable.js" rel="nofollow">https://github.com/pseudosavant/dom-event-to-css-variable.js</a>
Wow this is great. I could have <i>really</i> used some of these examples a few days ago.<p>CSS grid combined with media queries feels like cheating to me. Am I missing something big here, or is this all safe to use in 2022?
This page needs one sentence at the top that explains what Defensive CSS is. “Future proof interfaces” is far too vague (or maybe I’m not smart!)<p>I went to the “Introduction To” article but it began reading like a cooking recipe story.<p>The page is otherwise very elegant.
It's crazy that there's so much extra cruft when it comes to crafting web interfaces when a CLI is most often the most powerful and easiest way to get a job done. Am I just taking crazy pills?
Reminds me of the classic CSS book (2005?) by Dan Cederholm: <a href="https://www.amazon.com/Bulletproof-Web-Design-flexibility-protecting/dp/0321808355/" rel="nofollow">https://www.amazon.com/Bulletproof-Web-Design-flexibility-pr...</a>
Really love the togglable examples. It's often hard to imagine how a change look and while in a perfect world I'd have time to make a mockup to test each version, well, it's hardly a perfect world so examples are appreciated!
Those negative examples don't work for me on Safari, I can't drag the frame small enough to trigger the bad examples - it seems not to allow it.<p>So tbh the content looks good for me in both bad and defensive cases
Hilariously they haven't always applied the defences they're promoting - in the "Scroll chaining" example the page will scroll if you over-scroll the example
I constantly struggle with CSS grids when compared to, say, just using Bootstrap. I know Bootstrap comes with a lot of baggage, but the syntactic sugar is just so useful.
CSS3 got approved in 2006 and now we are at the point where we have to treat the language like it's fighting against us. Quality work the consortium has done in the past 15 years, eh?