3 ms·
> you want to step back and understand where its current width is coming from This touches on my key insight with CSS (and programming in general), in that if
by madeofpalk 5y ago
> you want to step back and understand where its current width is coming from
This touches on my key insight with CSS (and programming in general), in that if you have a problem with your page layout, that probably probably exists in the code you’re already written, so adding more code on top will only make things more difficult.
Step back, understand exactly why the layout is acting why it is, and address that problem rather than just monkey patching a hack on top.
- blacktriangle 5y agoThe problem there is that you're now refactoring a bunch of code that is working on the other 99% of your pages. This model is great, but in CSS when doing this in order to fix your current problem, you are almost guarenteed to break other layouts elsewhere, and very very few people are using automated view testing to see if layouts break. I think this is the core reason why functional CSS is growing, because by separating out your layouts from each other, one can actually approach CSS refactoring this way without worrying about breaking other pages.