[css-d] Inline media queries?

2012-08-30 Thread Micky Hulse
Throwing this one out there: Is it possible to inline a media query in a style= attribute? For example: div style=background-image: url(foo.png); @media only screen and (min-width: 1005px) { /* styles here */ }/div Is that a crazy idea? Better yet, is that a valid idea? Back story: I'm

Re: [css-d] Inline media queries?

2012-08-30 Thread Micky Hulse
Correction: Better yet, is that a valid idea? I meant to say valid code. I've just tested: div style=height: 20px; background-color: #000; @media only screen and (min-width: 1005px) { background-color: #eee; }/div It don't work none. :( Back to the drawing board! :D Thanks, M

Re: [css-d] Inline media queries?

2012-08-30 Thread Alan Gresley
On 31/08/2012 8:47 AM, Micky Hulse wrote: Correction: Better yet, is that a valid idea? I meant to say valid code. I've just tested: div style=height: 20px; background-color: #000; @media only screen and (min-width: 1005px) { background-color: #eee; }/div It don't work none. :( Back to

Re: [css-d] Inline media queries?

2012-08-30 Thread Micky Hulse
On Thu, Aug 30, 2012 at 5:01 PM, Alan Gresley a...@css-class.com wrote: Media queries usually contain selectors. Ha! Good point! I totally missed that. I'm so used to writing inline styles without selectors (for obvious reasons), I did not think to add a selector to the inline MQ. :D I assume