+ 4

CSS after & before vs. JS DOM

https://code.sololearn.com/WRVCWg65QPux/?ref=app If I want to add multiple theme (probably with pulldown menu), should I use JS DOM or CSS after & before ? I'm familiar with JS but I have never used CSS feature. I saw these feature in Mitali's some code. Also, should I use CSS variables or toggle (this time switch) like this? Is CSS more efficient or JS?

25th Feb 2019, 3:36 PM
Emoji FanBoy
Emoji FanBoy - avatar
3 Respostas
+ 5
This is a very nice question and is an important factor when working with design frameworks like React. I will look into it more but till then refer my answer and links in this discussion. Although around css animations but I think it's relevant to this discussion. https://www.sololearn.com/discuss/1574889/?ref=app
17th Mar 2019, 3:00 PM
Morpheus
Morpheus - avatar
+ 1
What??? CSS is better or is more easy? For me js is easy…
28th Feb 2019, 8:06 AM
Emoji FanBoy
Emoji FanBoy - avatar
0
Good question. I also like to know what's better: CSS or JS DOM
26th Feb 2019, 12:57 AM
Pete Wright
Pete Wright - avatar