4

I'm a novice in Css and it's difficult to search for this specific case on the internet, so I post a question here.

I'm working on an existing code base and I see something like this.

li {
  background-color: #000 \9;
  background-color: rgba(0, 0, 0, 0);
}

I don't understand the meaning of \9. But it looks to me the rules are duplicates and I should remove one of them.

Could you please explain the \9 and should I remove one rule? Thanks.

The reason I'm asking because I'm converting some css files to less files and \9 is causing a compilation problem.

Khanh TO
  • 48,509
  • 13
  • 99
  • 115

3 Answers3

8

\9 is an old Internet Explorer hack, which makes it work in IE only (8 and lower) rgba is the way to go you can safely delete the \9 rule

ʰᵈˑ
  • 11,279
  • 3
  • 26
  • 49
nire
  • 448
  • 2
  • 13
2

This is a CSS hack for IE 7, 8, & 9.

To find out more, please check this link.

Community
  • 1
  • 1
Punitha Subramani
  • 1,467
  • 1
  • 8
  • 6
2

This is an IE hack. For more details see http://webdood.com/?p=57.

SharpC
  • 6,974
  • 4
  • 45
  • 40
Wazan
  • 539
  • 1
  • 8
  • 27