2 ms·
But is that very different from code with logic bugs despite correct syntax? The solution for code is unit tests. Maybe the css needs that also.
by epicureanideal 4y ago
But is that very different from code with logic bugs despite correct syntax? The solution for code is unit tests. Maybe the css needs that also.
- zamadatix 4y agoIn code it's very easy to add your own errors/asserts which say "you dummy, you can't possibly fit these 3 things here the way you want" and then go modify your code so you can handle it the way you wanted. It's worth testing because when a test breaks you can modify it so the test passes. In CSS you can't customize that latter half though, if the 3 things render wonky when they don't fit you just have to hope there is some way to tell CSS to render it the way you want. Sure, you can run a test that says it failed to create the layout you were hoping for... but you already knew that and test or no test your only hope is you can find some way to do it with the predefined options in CSS. And the fun part is sometimes there is no way! You may just have to compromise on how your layout works or push some logic to JS to change the styling so you can do something more akin to the normal code way (at the loss of performance and clarity).