botem / css3-mediaqueries-js

Automatically exported from code.google.com/p/css3-mediaqueries-js
0 stars 0 forks source link

Can the script be extended to include links #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
> What steps will reproduce the problem?

1. Include <link rel="stylesheet" href="media-wide.css" media="screen and
(min-width: 1000px)" /> in the markup, along with css3-mediaqueries.js
2. Resize the window above 1000px.

> What is the expected output? What do you see instead?

I would expect to see the new styles in media-wide.css included. (I now
realize that @media blocks in non-query-enabled link elements are parsed.)

> Please provide any additional information below.

I realize that this would be an enhancement of the existing script.

Original issue reported on code.google.com by ethan.ma...@gmail.com on 11 Mar 2010 at 12:49

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
IMPORTANT NOTE: I only managed to get css3-mediaqueries.js to work for std IE 
desktops (my control for older browsers without media query support) when 
hosted on a server or localhost server.

Original comment by darren.h...@cogent.co.uk on 7 Mar 2011 at 11:32

GoogleCodeExporter commented 9 years ago
Same for me: only works when hosted on a server or localhost server.

Original comment by denison...@gmail.com on 19 Feb 2012 at 8:49

GoogleCodeExporter commented 9 years ago
I managed to make this work with <link media="..." /> tags with a little patch. 
If you download the development version 
(http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries_src.js) 
and and go to line 436 and add this small snippet:

if(link.getAttribute("media").replace(/^\s\s*/, '').replace(/\s\s*$/, '') != 
""){ text = "@media " + link.getAttribute("media").replace(/^\s\s*/, 
'').replace(/\s\s*$/, '') + "{" + text + "}";}

Then you can make it work.

Original comment by softtek....@gmail.com on 19 Jun 2012 at 10:47

Attachments:

GoogleCodeExporter commented 9 years ago
+1 for incorporating softtek's fix into the codebase...

Original comment by marcu...@gmail.com on 5 Jul 2012 at 10:01

GoogleCodeExporter commented 9 years ago
Hi softtek I have tried the above code with applied patch but still the <link 
media="..."/> is not working. 

Original comment by srivasta...@gmail.com on 28 Nov 2012 at 12:36

GoogleCodeExporter commented 9 years ago
It may work.. Try in localhost or your server.

Original comment by swagatob...@gmail.com on 31 May 2013 at 1:49

GoogleCodeExporter commented 9 years ago
I have used CSS-mediaqueries.js on my file but there is not working properly in 
ie8.
Please resolve this issue ASAP. Anyone can help me?

Original comment by pawanruh...@gmail.com on 9 Jul 2013 at 10:34

Attachments:

GoogleCodeExporter commented 9 years ago
Assuming this project is abandoned; would like to mark this issue Closed / 
WontFix.

Original comment by ethan.ma...@gmail.com on 14 Jul 2013 at 11:02

GoogleCodeExporter commented 9 years ago
hi, softtek. I have a try as you steps,It's OK when running in the local 
testing server, but as it release on server,It doesn't work? what about that ? 
could you help me ?

Original comment by Hugh.luo...@gmail.com on 24 Aug 2013 at 2:57

GoogleCodeExporter commented 9 years ago
Back from the dead... There is a new version of the script. It has some CSS 
parsing and processing improvements. If you're still using it, or would like to 
try again, could you confirm that this issue is solved or not?

Original comment by wou...@dynora.nl on 4 Apr 2014 at 11:46