Question

I am using Roots as the starter for a theme I have been working on. I then generated a print.css file, but in Chrome's case, it still is using the bootstrap-responsive.css queries, and messing things up.

This answer on SO explains the issue, and I know it fixes what I am having an issue with (tried it).

What happens is that when using this

wp_enqueue_style('roots_bootstrap_responsive_style', '/css/bootstrap-responsive.css', array('roots_bootstrap_style'), null, 'screen');

It always puts out

<link rel="stylesheet" href="/css/bootstrap-responsive.css">

When I really need it to show

<link rel="stylesheet" href="/css/bootstrap-responsive.css" media="screen">

If I try some of the other types listed on W3, some work and some don't (TV doesn't ever render anything, but print does). For example, my print one works fine:

wp_enqueue_style('roots_print_style', '/css/print.css', false, null, 'print');

How can I get this to work? Do I just do this in the header without using wp_enqueue_style, or am I missing something? I do not get any errors, and using WP 3.5.1.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top