marcj / css-element-queries

CSS Element-Queries aka Container Queries. High-speed element dimension/media queries in valid css.
http://marcj.github.io/css-element-queries/
MIT License
4.27k stars 487 forks source link

Only adds position relative, does not add min-width #178

Closed jordan-webdev closed 6 years ago

jordan-webdev commented 7 years ago

I'm trying to implement this into my WordPress theme. I've imported the files to the head.

wp_enqueue_script('jwd-resize-sensor-js', get_template_directory_uri() . '/inc/element_queries/ResizeSensor.js');
    wp_enqueue_script('jwd-element-queries-js', get_template_directory_uri() . '/inc/element_queries/ElementQueries.js');

CSS .showcase__header[min-width~="400px"] { display: none; }

However, the header is still visible. The min-width attribute is not being applied, but "positon: relative" is being added as an inline style.

marcj commented 7 years ago

Have you tried .showcaseheader[min-width~="400px"] { display: none; }, maybe its a regex issue.

jordan-webdev commented 7 years ago

Just tried, but no luck. Position: relative; added, but nothing else. No console errors.

I'm wondering if it has to do with the way WordPress enqueues scripts.

marcj commented 7 years ago

then we need a working demo and browser version to reproduce it. Maybe jsfiddle or something

marcj commented 6 years ago

Closing due missing feedback. Not possible to fix it without being able to reproduce it.