3 ms·
Maybe it's time to relearn the fundamentals! web.dev and MDN are great resources to do so. Start with the Box Model.
by gochi 3y ago
Maybe it's time to relearn the fundamentals! web.dev and MDN are great resources to do so. Start with the Box Model.
- XajniN 3y agoFundamentals don’t help when you are 15 divs deep.
- marcosdumay 3y agoYou 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.
- XajniN 3y agoNot my choice, that’s what you get when you inherit an Angular website.
- bombolo 3y ago> You have made some bad decisions if you find yourself 15 divs deep. Open instagram.com in a browser :D
- troupo 3y agoOr even W3C's own website
- truckerbill 3y agoDo you mean leaning on rules like: .myWidgetClass form{ ... } .myWidgetClass form >input{ ... }
- marcosdumay 3y agoSure, 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.
- netghost 3y agoI've got a feeling some people might consider this to be a rather snarky response, but honestly a lot of trouble comes from assuming you can muddle through CSS, and you can. Unfortunately that means it's easy to always be an expert beginner, and never quite grasp the underlying logic, as obtuse as it may be.