r/javascript • • Aug 21 '18

Effectively supported in all browsers, JavaScript has its own form of media queries just like CSS.

https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia
465 Upvotes

114 comments sorted by

View all comments

Show parent comments

-16

u/StoneCypher Aug 22 '18

I think that you are confusing "I can use css from Javascript" with "this must not be css"

8

u/crobison Aug 22 '18

Don’t be obtuse.

-8

u/StoneCypher Aug 22 '18

Insults won't change my opinion. Neither will mass downvoting.

If the code is defined by the css spec, it's css.

9

u/crobison Aug 22 '18

You are an idiot.