<s>
A	O
CSS	B-General_Concept
hack	I-General_Concept
is	O
a	O
coding	B-General_Concept
technique	O
used	O
to	O
hide	O
or	O
show	O
CSS	B-Language
markup	O
depending	O
on	O
the	O
browser	B-Application
,	O
version	O
number	O
,	O
or	O
capabilities	O
.	O
</s>
<s>
Browsers	B-Application
have	O
different	O
interpretations	O
of	O
CSS	B-Language
behavior	O
and	O
different	O
levels	O
of	O
support	O
for	O
the	O
W3C	O
standards	O
.	O
</s>
<s>
CSS	B-General_Concept
hacks	I-General_Concept
are	O
sometimes	O
used	O
to	O
achieve	O
consistent	O
layout	O
appearance	O
in	O
multiple	O
browsers	B-Application
that	O
do	O
not	O
have	O
compatible	O
rendering	O
.	O
</s>
<s>
Most	O
of	O
these	O
hacks	O
do	O
not	O
work	O
in	O
modern	O
versions	O
of	O
the	O
browsers	B-Application
,	O
and	O
other	O
techniques	O
,	O
such	O
as	O
feature	O
support	O
detection	O
,	O
have	O
become	O
more	O
prevalent	O
.	O
</s>
<s>
Due	O
to	O
quirks	O
in	O
the	O
interpretation	O
of	O
CSS	B-Language
by	O
various	O
browsers	B-Application
,	O
most	O
CSS	B-General_Concept
hacks	I-General_Concept
involve	O
writing	O
invalid	O
CSS	B-Language
rules	O
that	O
are	O
interpreted	O
only	O
by	O
specific	O
browsers	B-Application
,	O
or	O
relying	O
on	O
bugs	O
in	O
specific	O
browsers	B-Application
.	O
</s>
<s>
An	O
example	O
of	O
this	O
is	O
prefixing	O
rules	O
with	O
an	O
underscore	O
(	O
as	O
in	O
_width	O
)	O
to	O
target	O
Internet	B-Application
Explorer	I-Application
6	O
—	O
other	O
browsers	B-Application
will	O
ignore	O
the	O
line	O
,	O
allowing	O
it	O
to	O
be	O
used	O
to	O
write	O
code	O
specific	O
to	O
one	O
browser	B-Application
.	O
</s>
<s>
Similar	O
CSS	B-General_Concept
hacks	I-General_Concept
involve	O
inducing	O
syntax	O
errors	O
like	O
asterisks	O
,	O
missing	O
whitespace	O
,	O
and	O
CSS	B-Language
comments	O
around	O
property	O
names	O
.	O
</s>
<s>
Additionally	O
,	O
in	O
Internet	B-Application
Explorer	I-Application
6	O
and	O
7	O
,	O
the	O
!	O
important	O
declaration	O
is	O
recognized	O
as	O
such	O
with	O
any	O
string	O
after	O
the	O
exclamation	O
mark	O
,	O
e.g.	O
</s>
<s>
Although	O
newer	O
CSS	B-Language
rules	O
are	O
correct	O
by	O
current	O
standards	O
,	O
they	O
are	O
ignored	O
by	O
older	O
browsers	B-Application
as	O
"	O
invalid	O
"	O
.	O
</s>
<s>
By	O
writing	O
old	O
rules	O
followed	O
by	O
newer	O
rules	O
that	O
cancel	O
out	O
or	O
modify	O
the	O
old	O
ones	O
,	O
it	O
is	O
possible	O
to	O
only	O
activate	O
certain	O
rules	O
on	O
older	O
browsers	B-Application
.	O
</s>
<s>
Prior	O
to	O
version	O
10	O
,	O
Internet	B-Application
Explorer	I-Application
supported	O
a	O
special	O
comment	O
syntax	O
that	O
would	O
allow	O
blocks	O
of	O
HTML	O
to	O
be	O
read	O
only	O
by	O
specific	O
versions	O
of	O
the	O
browser	B-Application
.	O
</s>
<s>
These	O
comments	O
are	O
mostly	O
used	O
to	O
provide	O
specific	O
CSS	B-Language
and	O
JavaScript	B-Language
workarounds	O
to	O
older	O
versions	O
of	O
the	O
browser	B-Application
.	O
</s>
<s>
No	O
other	O
browsers	B-Application
interpreted	O
these	O
comments	O
or	O
offered	O
similar	O
functionality	O
.	O
</s>
<s>
Hiding	O
code	O
using	O
hacks	O
often	O
leads	O
to	O
pages	O
being	O
incorrectly	O
displayed	O
when	O
browsers	B-Application
are	O
updated	O
.	O
</s>
<s>
These	O
hacks	O
can	O
lead	O
to	O
unexpected	O
behavior	O
in	O
newer	O
browsers	B-Application
that	O
may	O
interpret	O
them	O
differently	O
than	O
their	O
predecessors	O
.	O
</s>
<s>
Since	O
Internet	B-Application
Explorer	I-Application
6	O
and	O
7	O
have	O
fallen	O
out	O
of	O
use	O
,	O
CSS	B-General_Concept
hacks	I-General_Concept
have	O
declined	O
as	O
well	O
.	O
</s>
<s>
Each	O
of	O
the	O
most	O
popular	O
browser	B-Application
rendering	O
engines	O
has	O
its	O
own	O
vendor	O
prefix	O
for	O
experimental	O
properties	O
.	O
</s>
<s>
However	O
,	O
due	O
to	O
the	O
proliferation	O
of	O
these	O
properties	O
in	O
live	O
code	O
,	O
the	O
browser	B-Application
vendors	O
have	O
begun	O
moving	O
away	O
from	O
this	O
practice	O
in	O
favor	O
of	O
feature	O
flags	O
.	O
</s>
<s>
Vendor	O
Prefix	O
In	O
Use	O
Layout	O
Engine	O
Created	O
by	O
Used	O
by	O
-ah	O
-	O
Yes	O
Formatter	O
Antenna	O
House	O
Antenna	O
House	O
Formatter	O
-apple	O
-	O
Yes	O
WebKit	B-Language
Apple	O
Inc	O
.	O
Apple	B-Application
Safari	I-Application
2.0	I-Application
,	O
Opera	B-Application
Widgets	O
,	O
WebKit-Based	O
Browsers	B-Application
(	O
as	O
legacy	O
prefix	O
)	O
-atsc	O
-	O
Advanced	B-Device
Television	I-Device
Systems	I-Device
Committee	I-Device
standards	I-Device
-epub	O
-	O
Yes	O
WebKit	B-Language
EPUB	O
Working	O
Group	O
Chromium	B-Language
/	O
Google	B-Application
Chrome	I-Application
,	O
WebKit-Based	O
Browsers	B-Application
-fx	O
-	O
Yes	O
Sun	O
Microsystems	O
(	O
now	O
acquired	O
by	O
Oracle	B-Application
Corporation	I-Application
)	O
JavaFX	B-Application
applications	O
-hp	O
-	O
Hewlett-Packard	O
(	O
now	O
HP	O
Inc	O
.	O
and	O
Hewlett	O
Packard	O
Enterprise	O
)	O
-khtml	O
-	O
Yes	O
/	O
yes	O
KHTML	B-Language
/	O
WebKit	B-Language
KDE	B-Application
KDE	B-Application
Konqueror	B-Application
/	O
Apple	B-Application
Safari	I-Application
1.1	O
through	O
Safari	B-Application
2.0	O
,	O
WebKit-Based	O
Browsers	B-Application
(	O
as	O
a	O
legacy	O
prefix	O
)	O
-moz	O
-	O
Yes	O
Gecko	B-Language
Mozilla	B-Operating_System
Foundation	I-Operating_System
Gecko-Based	O
Browsers[ 	O
?	O
</s>
<s>
]	O
,	O
Mozilla	O
Firefox	O
-ms	O
-	O
Yes	O
Trident	B-Application
/	O
MSHTML	B-Application
Microsoft	O
Corporation	O
Microsoft	B-Application
Internet	I-Application
Explorer	I-Application
mso	O
-	O
Office	O
Microsoft	O
Corporation	O
Microsoft	O
Office[?]	O
</s>
<s>
-o	O
-	O
Yes	O
Presto	B-Application
Opera	B-Application
Software	O
Opera	B-Application
desktop	I-Application
Browser	I-Application
up	I-Application
to	I-Application
version	I-Application
12.16	I-Application
,	O
Opera	B-Protocol
Mini	I-Protocol
,	O
and	O
Opera	B-Language
Mobile	I-Language
up	I-Language
to	I-Language
version	I-Language
12.1	I-Language
,	O
Nintendo	B-Device
DS	I-Device
&	O
Nintendo	B-Device
DSi	I-Device
Browser	B-Application
,	O
Nintendo	O
Wii	O
Internet	O
Channel	O
prince	B-Application
-	O
Yes	O
Prince	B-Application
YesLogic	B-Application
YesLogic	B-Application
Prince	B-Application
-rim	O
-	O
WebKit	B-Language
BlackBerry	O
Limited	O
RIM	O
Blackberry	O
Browser	B-Application
-ro	O
-	O
Yes	O
MARTHA	O
RealObjects	O
RealObjects	O
PDFreactor	O
-tc	O
-	O
TallComponents	O
TallComponents	O
-wap	O
-	O
Yes	O
Presto	B-Application
The	O
WAP	O
Forum	O
Opera	B-Application
Desktop	O
Browser	B-Application
and	O
Opera	B-Language
Mobile	I-Language
,	O
The	O
WAP	O
Forum	O
-webkit	O
-	O
yes	O
WebKit/Blink	O
Apple	O
Inc	O
.	O
(	O
WebKit	B-Language
)	O
/Google	O
Inc	O
.	O
(	O
Blink	B-Language
)	O
Apple	B-Application
Safari	I-Application
&	O
Safari	B-Application
for	O
iOS	O
(	O
WebKit	B-Language
)	O
,	O
Chromium	B-Language
/	O
Google	B-Application
Chrome	I-Application
desktop	O
and	O
mobile	O
(	O
Blink	B-Language
)	O
,	O
Opera	B-Application
desktop	O
and	O
mobile	O
from	O
version	O
14	O
(	O
Blink	B-Language
)	O
,	O
Android	O
browser	B-Application
(	O
Blink	B-Language
)	O
,	O
Nokia	O
MeeGo	O
Browser	B-Application
8.5	O
,	O
Nokia	B-Operating_System
Symbian	I-Operating_System
Browser	B-Application
7.0	O
and	O
later	O
(	O
WebKit	B-Language
)	O
,	O
Blackberry	O
Browser	B-Application
6.0	O
and	O
later	O
(	O
WebKit	B-Language
)	O
.	O
</s>
<s>
Also	O
,	O
adding	O
a	O
rule	O
for	O
each	O
browser	B-Application
's	O
implementation	O
of	O
a	O
function	O
does	O
not	O
scale	O
well	O
when	O
you	O
want	O
to	O
support	O
many	O
browsers	B-Application
.	O
</s>
<s>
Consequently	O
,	O
the	O
major	O
browser	B-Application
vendors	O
are	O
moving	O
away	O
from	O
vendor	O
prefixes	O
in	O
favor	O
of	O
other	O
methods	O
such	O
as	O
feature	O
queries	O
.	O
</s>
<s>
Multiple	O
JavaScript	B-Language
libraries	O
exist	O
to	O
detect	O
what	O
features	O
are	O
available	O
in	O
a	O
particular	O
browser	B-Application
so	O
that	O
CSS	B-Language
rules	O
can	O
be	O
written	O
to	O
target	O
them	O
.	O
</s>
<s>
Libraries	O
such	O
as	O
Modernizr	O
add	O
classes	O
to	O
the	O
html	O
element	O
,	O
allowing	O
for	O
CSS	B-Language
rules	O
such	O
as	O
.	O
</s>
<s>
A	O
new	O
feature	O
known	O
as	O
feature	O
queries	O
was	O
introduced	O
in	O
CSS3	B-Language
,	O
allowing	O
the	O
detection	O
of	O
specific	O
functionality	O
within	O
the	O
CSS	B-Language
(	O
without	O
requiring	O
the	O
use	O
of	O
a	O
JavaScript	B-Language
library	O
for	O
feature	O
detection	O
)	O
.	O
</s>
<s>
Obviously	O
,	O
rules	O
will	O
only	O
work	O
on	O
browsers	B-Application
that	O
support	O
.	O
</s>
<s>
While	O
JavaScript	B-Language
feature	O
detection	O
and	O
rules	O
can	O
help	O
to	O
target	O
browsers	B-Application
that	O
require	O
fallback	O
functionality	O
,	O
they	O
will	O
not	O
address	O
bugs	O
in	O
specific	O
browsers	B-Application
or	O
enable	O
that	O
advanced	O
functionality	O
.	O
</s>
<s>
Polyfills	B-Protocol
,	O
scripts	O
that	O
make	O
behavior	O
consistent	O
across	O
all	O
browsers	B-Application
,	O
can	O
be	O
used	O
to	O
add	O
support	O
for	O
new	O
CSS	B-Language
rules	O
(	O
for	O
example	O
,	O
media	O
queries	O
in	O
IE	O
8	O
)	O
as	O
well	O
as	O
fix	O
bugs	O
in	O
specific	O
browsers	B-Application
.	O
</s>
<s>
Since	O
polyfills	B-Protocol
add	O
or	O
fix	O
functionality	O
in	O
browsers	B-Application
that	O
do	O
not	O
have	O
it	O
,	O
they	O
serve	O
a	O
different	O
purpose	O
than	O
feature	O
queries	O
,	O
but	O
can	O
be	O
used	O
in	O
combination	O
with	O
them	O
.	O
</s>
