📜 ⬆️ ⬇️

Conditional comments in ... Firefox

Saytik boomed.
The layout looked like this:
<!--[if ie 6]>, !<![endif]-->
<p>, =)</p>

I tested it in different browsers - everything is great. Well, everything, I think it's time to send. And I send the following code to the customer:
<!--, , .-->
<!--[if ie 6]>, !<![endif]-->
<p>, =)</p>

The next day, the customer calls and says that I am a schmuck, a sucker and a nipatsan so-so layout designer and insulted his best feelings, saying that his Firefox is bad.

All salt.


And the whole point is that firefox performs conditional comments if normal comments are located directly in front of them. I do not know from which version this disgrace began, but in ours with our customer 3.6.8 it is.
PS Did not find how to tell Mozille about the bug.

UPD. Everything, I goof, sorry for misinformation :( The reason was that inside the comment was '-' (double hyphen), which FF (unlike, by the way, from other browsers), as it should be according to the specification, regarded as the end comments. And the rest of the html fulfilled. True, even though I really screwed up, FF behaved weird.

')

Source: https://habr.com/ru/post/100789/


All Articles