by atfzl on 8/19/21, 6:26 AM with 92 comments
by habosa on 8/21/21, 1:02 PM
It's a shame that most of the comments here are just people criticizing web dev frameworks and browsers.
by Agentlien on 8/21/21, 5:39 AM
In fact, in games it also happens with the transforms of objects and has been the cause of a number of performance issues during development of AAA games I've been part of.
by Pxtl on 8/21/21, 7:01 AM
by myfonj on 8/21/21, 7:52 AM
<style>
main:only-child * { /* ... */ }
</style>
<body>
<main>lots of stuff </main>
</body>
When second node is appended to <body> our CSS selector no longer matches so the rule stops being applied and content of the <main> is no longer styled.When there is (next) sibling wrapper present, anything what happens inside it cannot affect the <main> in our example: in CSS there simply is currently no way to target element according it's next sibling inner structure. (There is one for previous sibling: `prev:empty + next {}`: when prev stops being empty, rule stops to match.)
by foobar33333 on 8/21/21, 5:49 AM
by chrismorgan on 8/21/21, 2:44 AM
Consider this style rule set which does just what it looks like:
head,
title,
style,
script {
display: block;
}
by ComputerGuru on 8/21/21, 4:47 AM
by sandstrom on 8/21/21, 7:12 AM
What happened here? The tooltip was attached to the tooltip container and not to the body.
This invalidated a much smaller subtree, which was the tooltip container. The tooltip container
is not visible in the page, so modifying it doesn’t invalidate the complete page render tree.
If the tooltip container would have been visible in the page, then the complete render tree
would be invalidated but in this case only an independent subtree was invalidated.
So the tooltip container needs to be hidden with e.g. `display: none`?by namelosw on 8/21/21, 5:28 AM
IIRC there were many tutorials in the early days of React that mentioned this.
by quickthrower2 on 8/21/21, 3:20 AM
by geuis on 8/21/21, 3:59 AM
by sidcool on 8/21/21, 6:59 AM
by hugneutron on 8/21/21, 4:13 PM
by faeyanpiraat on 8/21/21, 8:12 AM
That step seems unrelated
by Aeolun on 8/21/21, 6:58 AM
Glad all that knowledge is useful in different contexts though.
by TekMol on 8/21/21, 5:18 AM
Did anybody get Popper to work as an ES6 module? I tried for a while and gave up.
by imranghani on 8/21/21, 4:43 AM
by bserge on 8/21/21, 8:00 AM
Some websites don't even have text accompanying their unintuitive but kewl looking icons.
The future is now, old timers!
by catmanjan on 8/21/21, 4:38 AM