Is there a way to write inline CSS in a string format instead of an object format?
I attempted the following, but it did not work as expected:
<div style={"color:red;font-weight:bold"}> Hello there </div>
What is my reason for wanting to do this?
My usual workflow involves initially writing inline CSS and once it looks good in the browser, I copy and paste that inline code into my .scss
file.
Using objects would require me to convert them into CSS format first before pasting them into my file, which seems quite tedious.
(Note: If direct string formatting is not possible, I am also considering using a VSCode extension that can easily convert objects into CSS.)