3 ms·
I can't find any information about `position:relative` impacting page render performance. Please share. Given my experience of low impact on render performance
by harlanlewis 14y ago
I can't find any information about `position:relative` impacting page render performance. Please share.
Given my experience of low impact on render performance of vanilla properties like this (transitions are a whole 'nother story), I'm much more concerned with whether this is of benefit to developer happiness.
You'll never be able to use `position:absolute` for anything outside of the context of an element's parent, and opting out of this back to default behavior is much more painful than opting in with a better-scoped `.feature * {position:relative}`.
Every new developer will need to wrap their head around nonstandard page flow, and customizations like this have a way of accumulating into a very intimidating environment. As a general rule, I don't want to inherit anything silent and clever without very compelling reasons (* {box-sizing:border-box} passes this test because it makes so many things so much easier).
- ricardobeat 14y agoposition:relative is probably not that expensive, but the '*' causes very negative impact - the browser will scan the whole tree trying to match the rules every time the DOM changes. http://minus.com/lyJrZzYj4bSoH http://minus.com/lyJrZzYj4bSoH
- garand 14y agoYou'll never be able to use `position:absolute` for anything outside of the context of an element's parent. While true, I find that the instances that I need something to be absolutely positioned outside of it's context are few and far between. Also, it is quite easy to set position static on the parent elements. Every new developer will need to wrap their head around nonstandard page flow I work with a team that is on board with this, so it hasn't been an issue yet. Also, refer to this: http://css-tricks.com/things-it-might-be-funuseful-to-try-the-universal-selector-on/ http://css-tricks.com/things-it-might-be-funuseful-to-try-th...