html-node icon indicating copy to clipboard operation
html-node copied to clipboard

Add basic CSS macro.

Open Conner-PYS opened this issue 2 years ago • 1 comments

Draft PR; open to suggestions for wider support of more CSS syntax.

Conner-PYS avatar Aug 03 '23 02:08 Conner-PYS

@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.

vidhanio avatar Aug 03 '23 16:08 vidhanio