gehuangyi20 / ie7-js

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

A way to exclude certain stylesheets... #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Can we have a way to exclude stylesheets from ie7's scope?

Original issue reported on code.google.com by makin...@gmail.com on 25 Feb 2008 at 9:50

GoogleCodeExporter commented 9 years ago
Good idea.

Original comment by dean.edw...@gmail.com on 25 Feb 2008 at 11:40

GoogleCodeExporter commented 9 years ago
This will probably be enabled by inclusion of a CSS comment:

/* _IE7_IGNORE_ */

Any objections?

Original comment by dean.edw...@gmail.com on 26 Feb 2008 at 10:12

GoogleCodeExporter commented 9 years ago
Nope! Probably the most unobtrusive way to do it.

Original comment by makin...@gmail.com on 27 Feb 2008 at 12:13

GoogleCodeExporter commented 9 years ago
However, will ie7-js just ignore everything after the comment or ignore an 
entire
document with the comment? If its the later, I think it'd be smarter to let 
ie7-js
read anything before the comment and anything after the comment is ignored. Its 
not
completely necessary, but its certainly a nice-to-have.

Original comment by makin...@gmail.com on 27 Feb 2008 at 12:17

GoogleCodeExporter commented 9 years ago
You're right. Ignoring everything after the comment is better.

Original comment by dean.edw...@gmail.com on 27 Feb 2008 at 1:20

GoogleCodeExporter commented 9 years ago
What about:
/* START_IE7_IGNORE_ */
<link rel=stylesheet />
/* END_IE7_IGNORE_ */

Original comment by drew.fre...@gmail.com on 2 Mar 2008 at 11:03

GoogleCodeExporter commented 9 years ago
Is this the same issue as ie7.js not respecting media queries such as 
media="only screen and (max-device-
width: 480px)"?

Original comment by carise...@gmail.com on 13 Jun 2008 at 12:09

GoogleCodeExporter commented 9 years ago
http://banjax.com/t/ie7-js/with.html
http://banjax.com/t/ie7-js/without.html

These may help, then again they may prove I'm an idiot.

With IE7-js IE5.5-7 will parse all the stylesheets (IE8 acts properly and 
ignores the last two); without IE7-js 
IE5.5-8 will parse only the first (screen) stylesheet, which is correct afaik.

Original comment by carise...@gmail.com on 13 Jun 2008 at 1:14

GoogleCodeExporter commented 9 years ago
Does anybody have a solution for this yet? I am running into problems with IE7 
and
dojo style sheets. The dojo styles work fine without the patch, loading the 
patch
breaks them. Unfortunately I can't live without either library!

If there is any way I can make IE7 skip parsing either specific css files or 
specific
nodes I would love to hear about it.

Original comment by alerque on 28 Jul 2008 at 11:25

GoogleCodeExporter commented 9 years ago
MAybe Im missing something here, but why not use conditional comments to 
exclude ie7?
http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp

Original comment by thetoolman on 3 Sep 2008 at 8:27

GoogleCodeExporter commented 9 years ago
thetoolman: Your link to msdn is broken, but I don't think it matters really. 
The
problem is not excluding IE7 (the browser) from parsing either the patch or some
styles, the problem is in getting IE7 (the patch) to not modify the css 
declarations
on some parts of documents. Conditional comments are no use for this because 
they
only stop the browser from processing or not processing a block of something. 
We want
the patch to parse some things but not others and there is no provision for 
that. You
will notice some of the suggestions above are for what are basically conditional
comments but targeted at IE7 (the patch).

Original comment by alerque on 3 Sep 2008 at 8:41

GoogleCodeExporter commented 9 years ago
Any updates with this one?

Also, does it really need to be as complex a string as that?
Why not something simpler, such as /* !IE7 */

Original comment by Hunn...@gmail.com on 6 Nov 2008 at 7:01

GoogleCodeExporter commented 9 years ago
This is necessity, I use ExtJS, it contains huge css files, so ie7-js takes a 
lot of
time to parse it, ie just hangs for a few seconds. I would love to exclude it 
somehow
from ie7-js parsing.

Original comment by mirko%m-...@gtempaccount.com on 23 Mar 2009 at 4:27

GoogleCodeExporter commented 9 years ago
It been implemented?
Can be in two modes:
(how cited by drew.freyling with modf)
/*<IEonly>*/
 {...}
*/</IEonly>*/
Will processed ONLY if is IE (useful to CSSHacks)

Or can be "inline":
{...} /*IEonly*/
{...}
{...} /*IEonly*/

Bye.

Original comment by david7...@gmail.com on 2 May 2009 at 3:43

GoogleCodeExporter commented 9 years ago
@david.... english ? do you speak it ?

This feature would be awesome, currently I'm having issues with ie8.js and 
YUI's reset-fonts-grids

Original comment by jaysw...@gmail.com on 15 May 2009 at 8:52

GoogleCodeExporter commented 9 years ago
Any progress on this? It would extremely helpful!

Original comment by cultosau...@gmail.com on 4 Jun 2009 at 12:43

GoogleCodeExporter commented 9 years ago
I've tried the examples listed on this page to fix a problem with using the YUI
library with IE9.js, but none seem to work, is there an example I can copy, or 
has
the functionality not been implemented yet?

Thanks and regards

Andy.

Original comment by andrew.k...@gmail.com on 19 Apr 2010 at 8:46

GoogleCodeExporter commented 9 years ago
Please explain how to use this? I have tried to do it, but it doesn't work at 
all.

Original comment by jariwala...@gmail.com on 16 Sep 2010 at 1:27

GoogleCodeExporter commented 9 years ago
That is of high importance and priority as the lack of it makes most of CSS 
frameworks and reset style sheets ineffective. Any "inherit" rules are ignored 
and break the design.

As proposed already, it should allow to exclude a range of declaration in, 
preferably, standard way, ie. by a comment. The simpler, the better:

border: none; /* ie7_ignorestart / font-family: inherit; font-size: inherit; /_ ie7_ignore_end */ font-style: inherit; font-weight: inherit;


This should also allow to exclude the whole style sheet with an attribute to 
"link" element, eg.:

Original comment by grzegorz...@gmail.com on 18 Oct 2010 at 1:59

GoogleCodeExporter commented 9 years ago
Hi ! 
What happened to this feature ? I need it on one of my company website because 
media queries are applied but without taken into account the specified rules

Original comment by thomas.s...@gmail.com on 26 Nov 2012 at 4:37