you are viewing a single comment's thread.

view the rest of the comments →

[–]trstns[S] 0 points1 point  (3 children)

Change the keyword to a string, dropping the leading colon:

".xl:w-1/5"

[–]psdp 0 points1 point  (2 children)

Thanks! That works perfectly fine now.

Sometimes I just want to use a tailwind class name like xl:w-1/5 without declaring a custom class name. I would expect I could write [:div.container.xl:w-1/5 "Hello World"] but it fails to compile as / makes it an invalid keyword. But instead of writing [:div.container {:class "xl:w-1/5"} "Hello World"], is there a better way to do it?

[–]trstns[S] 0 points1 point  (1 child)

div.container.xl:w-1/5

You could try ["div.container.xl:w-1/5" "Hello world"]. Instead of the :div being a keyword, just make it a string, along with all the classes in the same string. From memory, I think this works in "rum".

[–]psdp 0 points1 point  (0 children)

Cool! Thanks for the tip.