So do I, I am somehow wired to think "* is going to be very bad for performance because now the rendering engine will need to apply this bunch of rules to any and every element on earth, which might not be only overkill, but which also might have undesirable side effect."
It might not really apply here but the feeling is present.
https://www.reddit.com/r/web_design/comments/5u6e7b/comment/...
Other browsers might see different results, especially Firefox which has a very fast / efficient CSS engine.
ps: a difference of 43 ms for one page load would be huge indeed. By comparison, a frame in a 30 fps video is 33 ms.
margin-block-* and margin-inline-* (versus margin-{top,right,bottom,left}) are more generic and take into account the writing-mode, direction, and text-orientation.
https://developer.mozilla.org/en-US/docs/Web/CSS/margin-inli...
Notably, for instance, if you want to support both rtl and ltr languages, margin-inline-start (instead of margin-left) will behave correctly and put the margin at the correct side.
If you ask me, it's a step forward specifying/conveying the intent and not hard-coding the look.
* + * is 0,0,0.
:not(:first-child) is 0,1,0.
:where(:not(:first-child)) would take it back to 0,0,0.
It reads like: apply a top margin to all direct children that are not the first one.
I write it like this:
I probably should start using -block-start. I'll keep my selector though I think.I didn't know about the default value parameter of --var, I'll probably use it too.