New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Media query instead of media type in link tag #9352
Comments
Not really sure what you're asking us to do here? |
Could you go https://codex.wordpress.org/Function_Reference/wp_enqueue_style
And handle small screen stylesheet a different way. |
Feel free to use our https://github.com/woothemes/woocommerce/blob/master/includes/class-wc-frontend-scripts.php#L54 But this is valid HTML and displays to be read only by small screens. Here for your reference: http://www.w3.org/TR/css3-mediaqueries/ |
Thank you. For googlers:
@media only screen and (max-width: 768px) {
@import 'woocommerce-smallscreen.css';
} |
WordPress accept any media queries, however it seems that the docs needs some update. https://core.trac.wordpress.org/browser/tags/4.3.1/src/wp-includes/class.wp-styles.php#L0 |
Yes. |
@szepeviktor this is a W3 Total Cache issue, not a WooCommerce or WordPress issue. |
But, I'll update the docs for you @szepeviktor ;) |
Thank you. |
@szepeviktor good luck! |
Although it is valid HTML WordPress expects media type in wp_enqueue_style/wp_register_style.
Please consider using only media type.
Use case: W3 Total Cache merges small screen and desktop CSS files.
I know it is a caching consideration to use media query here.
The text was updated successfully, but these errors were encountered: