css-element-queries icon indicating copy to clipboard operation
css-element-queries copied to clipboard

Can't have multiple classes using element queries

Open andi-b opened this issue 4 years ago • 0 comments
trafficstars

If I have a media query against one class and another media query against another class, if the element has both classes, it will only apply the second media query. I've created a JS fiddle to demonstrate:

https://jsfiddle.net/bambeck/L7fj4qyp/

I have a solution where by instead of passing an id (single class) to the function SetupInformation(element, id), I loop through the element's classes (this.element.classList). I'm unsure what the fallout could be but it seems to work.

andi-b avatar Dec 21 '20 23:12 andi-b