Hi i'm an avid web and app developer in search for creativity and always going after new ideas.
Developer of Atomics Digital, Invoice Me and Reactor JS
Did I say you shouldn't ever use class- and id-selectors?
Most CSS I see has things like .some-wrapper-class and then .some-wrapper-class-child. My point is that you should write .come-wrapper-class>* instead, which is both more readable and more maintainable.
I'm not against naming. I'm just saying if you can, you should prefer describing.
Hi i'm an avid web and app developer in search for creativity and always going after new ideas.
Developer of Atomics Digital, Invoice Me and Reactor JS
operation is a very costly operation in terms of performance, so i would refrain from using it. ALso its not very friendly, what if you want to target only certain children? I dont agree with this approach at all. I think naming is very good and not going away any time soon.
Found a nice article that confirms what you said. The best part is the conclusion:
Is all this really necessary? — The short answer is; probably not.
Or, to throw a very well-known quote at the wall
We should forget about small efficiencies, say about 97% of the time: premature optimisation is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.
We live in 2020. Browsers have magnificent benchmark tools that can help us find bottlenecks, and yes, of course we should give up good style if we can significantly improve performance. But that doesn't make it a good "default style" to start coding.
When I write some code to handle data I don't do manual CSE or Loop Fusion either, because it creates an unreadable mess. When a bit of hot code runs too slow, I then optimise it. Same with CSS, except I don't usually even write nearly enough CSS for it to start slowing down a site.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
So use what? just tag names and pseudo-selectors? It makes it much harder though
Did I say you shouldn't ever use class- and id-selectors?
Most CSS I see has things like
.some-wrapper-class
and then.some-wrapper-class-child
. My point is that you should write.come-wrapper-class>*
instead, which is both more readable and more maintainable.I'm not against naming. I'm just saying if you can, you should prefer describing.
Found a nice article that confirms what you said. The best part is the conclusion:
Or, to throw a very well-known quote at the wall
We live in 2020. Browsers have magnificent benchmark tools that can help us find bottlenecks, and yes, of course we should give up good style if we can significantly improve performance. But that doesn't make it a good "default style" to start coding.
When I write some code to handle data I don't do manual CSE or Loop Fusion either, because it creates an unreadable mess. When a bit of hot code runs too slow, I then optimise it. Same with CSS, except I don't usually even write nearly enough CSS for it to start slowing down a site.