Cascading Style Sheets/Hacks and Filters/Caio Hack

Caio Hack is a simple CSS comments-based hack used in 'inline' and 'external' CSS declarations to hide information from Netscape 4. This hack is named after Brazilian Caio Chassot, the person who accidentally discovered this peculiar behaviour in the Netscape browser.

The problem with Netscape 4.x
The Netscape 4.x browser has had a reputation of having an extremely buggy CSS capability and support and as a result people discovered quirky functionalities within the CSS interpretor and used them as exploits in cross-browser CSS compatibility.

How it works
The Caio Hack makes use of a rather peculiar behaviour in the browser's CSS comments' interpreter. Consider the following code: To hide, for instance, the selector, we would need to delimit it in the special comments as below: } /* */ .foo3 { color: blue; } Not just selectors, but individual properties can also be hidden from the NS4 engine.