Can you explain how the baselineTrim functions? #60
-
I think I understand roughly what's going on with most of the calculations, but the Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Best way to look at this is a quick demo. Using html nodes to replicate the pseudo elements, you can see that without the The display table technique is also being used to prevent margin collapse resulting in unexpected outcomes when using background colours. Hope that helps |
Beta Was this translation helpful? Give feedback.
Best way to look at this is a quick demo.
Using html nodes to replicate the pseudo elements, you can see that without the
marginTop
on theafter
the following node is not pulled up to the baseline of the cropped text node.The display table technique is also being used to prevent margin collapse resulting in unexpected outcomes when using background colours.
Hope that helps