News for hackers. Stuff that matters.
Re:CSS Findings from the Threads App by marcosdumay on Sunday July 16, 2023 @02:19PM (#36749995)
You have made some bad decisions if you find yourself 15 divs deep.

There is a surprisingly small amount of content out there on how to competently engineer your CSS (and a lot of it is bad). Most people don't even think it's something you do.

But basic things like making your general rules generic and pushing context descriptively into the HTML go a long way into making your code understandable.

Re:CSS Findings from the Threads App by XajniN on Sunday July 16, 2023 @02:23PM (#36750020)
Not my choice, that’s what you get when you inherit an Angular website.
Re:CSS Findings from the Threads App by bombolo on Sunday July 16, 2023 @05:19PM (#36751508)
> You have made some bad decisions if you find yourself 15 divs deep.

Open instagram.com in a browser :D

Re:CSS Findings from the Threads App by troupo on Tuesday July 18, 2023 @02:46AM (#36768745)
Or even W3C's own website
Re:CSS Findings from the Threads App by truckerbill on Monday July 17, 2023 @11:26AM (#36759405)
Do you mean leaning on rules like: .myWidgetClass form{ ... } .myWidgetClass form >input{ ... }
Re:CSS Findings from the Threads App by marcosdumay on Monday July 17, 2023 @06:10PM (#36764754)
Sure, if you have some general rules that apply to all your widgets. If you are talking about something more specific, you are better with a more specific name.