html-node
html-node copied to clipboard
Add basic CSS macro.
Draft PR; open to suggestions for wider support of more CSS syntax.
@Conner-PYS thanks!
yeah, there is definitely some prior discussion that has been done here.
currently, the best solution using my library is to use a Node::UnsafeText (or unsafe_text! and just put your css in a in that node.
the problem, as you mentioned in your example, is that TokenStreams are whitespace-agnostic, so we cannot recreate some css attr-name faithfully.
there is a potential workaround that has been discussed here, using a trick where you retrieve the source text of the macro invocation and reconstruct the RawText exactly as it was written.