DEV Community

Discussion on: VibeJS - A Small JavaScript Library for Composing User Interfaces and Apps

Collapse
hugekontrast profile image
Ashish Khare😎

String template for CSS is good. I'll try it.

Thread Thread
bretgeek profile image
bretgeek Author

Awesome!

You could even store your complete CSS in something like:

const cssvar = color: blue; display: block; width: 50px; ;

Which can span multiple lines if you want (because of the backticks).

then do:

myRef.$css(${cssvar})

Thread Thread
bretgeek profile image
bretgeek Author

Be sure to put backticks around the grey areas above.. for some reason Dev.to is removing them from my reply.

Thread Thread
hugekontrast profile image
Ashish Khare😎

Don't worry I know that. Plus, that is markdown.