Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
(!ie) in conditional comments around html tag #425
Also you should read Paul Irish's explanation on this topic. I should note that this was linked in the code itself.
This is kinda basic stuff. If you google things before posting issues you can save a lot of waiting time for a response.
i've previously read both posts, and mentioned the second one in my second comment. and i appreciate your concern for my time, but i've googled it and it's nothing critical either way, just something i'm curious about, so i asked.
however, neither articles explain the necessity of the !(ie)...ppk's post doesn't even mention that at all.
i get the same result, with a few less characters, by just using:
[if gte IE 9]
thx for bringing it up dustinhorton.
the IE conditionals are pretty ugly and from a "i want my markup to feel nice and clean" POV, they really suck. at the same time, they're super useful.
as for dreamweaver,
i think a small change to my original code (around the
that said it's been a long-ass time since i did testing on this so I kinda forget the details. ;)
(via @dustinhorton). AFAICT, we can't do this because it would assume no html tag for non-IE. now technically other browsers would create one but not one with the
(via @necolas) this way you wouldnt need to do an OR to combo
Just a minorly shorter variation.
the MSDN page on CCs is pretty weak, so I'm a little unclear what the best way about this is.
If someone wants to try a few of these out and report back the findings, i'd be happy to tweak our syntax if we can get away with something smaller / more clear. ♡
Just wrote a comment and deleted it on my phone when attempting to edit it...but briefly:
I don't believe the html will be ignored. I removed the !(IE), and in all the browsers I tested, the no-js class was still on the tag meaning its not being ignored by non-ie browsers.
As I understand ie conditional comments, this makes perfect sense...non-ie browsers don't care about the content within them (either in the condition or the code between the comments). Might not be entirely true.
OK I've done some quick tests.
@paulirish: You cannot use that shorted variation. It failed in IE 8 and
@dustinhorton: You're absolutely right about the
This is a standard CC, contents inserted only to IE because it is commented out for other browsers.
Adding the extra characters changes the boundaries of the HTML comments for non-IE browsers, while preserving the CC for IE. So the content is seen by all non-IE browsers and any IE browsers that meet the initial condition.
This is probably the shortest option for IE9+ and all non-IE browsers.
Although perhaps using
@dustinhorton I'm sorry for my initial judgment of your question. It seems
I won't have time to test right now, but once you all decide what will be
On Fri, Apr 8, 2011 at 6:03 PM, dustin <