Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> so the usage of margin-top should always be avoided

Not really if you consider sibling layouts, e.g.: https://matthewjamestaylor.com/css-margin-top-vs-bottom

> owl selector: performance implications - it's fairly bad from a performance POV to use it.

Arguing about "CSS performance" is futile when the real cause of bloatedness is mostly JavaScript these days (also: http://alistapart.com/article/axiomatic-css-and-lobotomized-...).

The owl-selector can actually be quite elegant, but becomes a burden if you have lots of side-by-side blocks (which would always need to set their margin-top to 0).



I was suprised the degree to which selector performance is a negligible overhead in normal use these days.

Was browsing through the docs for some Vue+CSS library or another recently, and the author had done quite a lot of research into this, was interesting.

They were heavily using the square bracket html-attribute selector notation, although I'm not sure if it performs better now, or if modern processors are just that much faster.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: