bobo
bobo

Reputation: 8727

What is the use of this CSS hack in Safari?

What is the use of this CSS hack in Safari?

/* CSS Hack Safari */
#dummy {;# }

I found it in this page: http://jscroller2.markusbordihn.de/example/endless/

Upvotes: 1

Views: 1586

Answers (1)

Josh Crozier
Josh Crozier

Reputation: 241198

After doing some Googling, I was able to find something pertaining to Safari and browser hacks..

Apparently, older versions of Safari would ignore CSS declarations that were preceded by a hashtags. For instance:

h1 {
    font-size:24px;
    font-size:30px;#
}

If Safari were to come across something similar to this, it would make h1 24px, and completely ignore the 30px.. However, say IE, or Chrome were to see this, they would read the declaration and make the fontsize 30px because of the fact that they don't take the hashtag into consideration. To my knowledge this little 'hack' no longer works on newer versions of Safari.. Here is my reference.

Now back to the question:

#dummy {;#}

This doesn't particularly do anything, so I don't really see why this was in their code.

However, I am assuming that something was originally placed in there, and later removed due to the fact that this hack no longer works..

This is a rather interesting source on browser hacks..

Upvotes: 1

Related Questions