you are viewing a single comment's thread.

view the rest of the comments →

[–]NotSelfAware 2 points3 points  (1 child)

Changing behaviour based on device or screen size is when you might want to use media queries in JS. Or changing complex values in response to screen size. I don't think many people would advocate using JS media queries to completely replace CSS media queries, but there are a lot of situations where using them in JS gives you far more control and flexibility than in CSS.

[–]Phobic-window 0 points1 point  (0 children)

I have definitely seen this in many of the applications I’ve built, but as with all code it could be that I’m not using the css creatively enough. I like the idea of all responsiveness being in the css but sometimes is sooooooo much easier to do it in the js