length-property: length \9;
hackLast updated 2016-02-03.
.your-selector-here { some-length-property-here: somelength \9; }
…where somelength
is a CSS length value and some-length-property-here
is a CSS property whose value can be a CSS length.
Source: Browser CSS Hacks by Paul Irish
Important note!
This article only applies to the specific properties mentioned below and only applies when there is space between somelength
and \9
.
Adding spaces or using different properties may change the compatibility of the hack.
You have been warned.
If the square above shows the word "Affected", then your browser supports this hack for the width
and height
CSS properties.
If the square above shows the word "Affected", then your browser supports this hack for the margin-{top,bottom,left,right}
CSS properties.
If the above square is light green, then your browser supports this hack for the padding-{top,bottom,left,right}
CSS properties.
If the above square is light green, then your browser supports this hack for the border-{top,bottom,left,right}-width
CSS properties.
Backslash (\
) is used as an escape character in CSS. So \9
is an escape sequence which encodes the tab character (U+0009). Presumably the affected browsers are interpreting it like a literal tab character and thus ignoring it when parsing length values, since whitespace between the value and the semicolon that ends a declaration doesn't matter in CSS (something like width: 5px ;
is perfectly valid). The space before the \9
doesn't appear to affect its compatibility. IE8-10 are known to suffer from the bug that this hack relies upon.
Check out the links for corroborating screenshots.
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
---|---|---|---|---|---|
Chrome | OS X Safari |
iOS Safari |
Firefox | MS Edge1 | Internet Explorer |
49
Unknown |
10
Unknown |
9.3
Unknown |
45
Unknown |
13
Unknown |
|
48
Unaffected |
9.0.3
Unaffected |
9.2
Unaffected |
44.0
Unaffected |
12.10240
Unaffected |
11
Unaffected |
47
Unaffected |
8.0.8
Unaffected |
8.4
Unaffected |
43.0.1
Unaffected |
12.10166
Unknown |
10
Affected |
26
Unaffected |
7.1.7
Unaffected |
7.1
Unaffected |
4.0.1
Unaffected |
9
Affected |
|
25
Unknown |
6.2.7
Unknown |
6.1
Unknown |
8
Affected |
||
7
Unknown |