Could you write all CSS inside Javascript?

Hi there, I'm new to js and I saw that by getting the element by id, or tag name etc, you can ad style to it.
What if one would want to write all css by using this method? Would be possible? Would there be limitations? Just curiosity

1 Reply 1 reply marked as answer

JA Jesus Arockia Sankaran S Syncfusion Team February 25, 2021 12:57 PM UTC

Hi sun, 

Thank you for contacting Syncfusion support. 

Yes, we can write CSS in javascript and it is also one of the ways to include CSS into HTML page. But, completely writing it using JavaScript is purely based on our individual preferences. However, we request you check following link for reference. 


Also, we ask you to post your general query in public discussion forum such mozilla developer forum, stackoverflow, etc.. for reaching out to wide range of developer community. 

Please get back to us if you have any queries related to Syncfusion components. 

Regards, 
Jesus Arockia Sankaran S 


Marked as answer
Loader.
Up arrow icon