::before and ::after are quite widely used. And current such content is just missing when rendered with Blitz. Use cases that I'm aware of are:
Icon fonts such as Font Awesome
Decorative markers on elements (these are often absolutely positioned)
Some notes:
::before and ::after behave as elements inside the node they are targeting, as the first and last children.
In Blitz should probably be implemented as Option<NodeId> where the node is of type AnonymousBlock (which we might want to rename to PsuedoElement / we might also want to merge with Element).
They should probably be included in the layout_children of the parent node if possible.
I'm not quite sure when or how the anonymous nodes should be generated
We'll also need to clean them up when the parent is dropped (or it's styles change such that it no longer has a ::before or ::after style, but this problem also applies to anonymous blocks so this could be ignored for now (and dealt with along with the other memory leaks).
::before
and::after
are quite widely used. And current such content is just missing when rendered with Blitz. Use cases that I'm aware of are:Some notes:
::before
and::after
behave as elements inside the node they are targeting, as the first and last children.Option<NodeId>
where the node is of typeAnonymousBlock
(which we might want to rename toPsuedoElement
/ we might also want to merge withElement
).layout_children
of the parent node if possible.::before
or::after
style, but this problem also applies to anonymous blocks so this could be ignored for now (and dealt with along with the other memory leaks).