$browser = $_SERVER['HTTP_USER_AGENT'];
if( strpos( $browser, 'W3C_CSS_Validator_' ) === false )
echo( "<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />" );
Saturday, 14 April 2012
Hiding CSS from W3C's validators
While trying out a different web font for my portfolio, I noticed that Open Sans caused my site to fail validation whereas Ubuntu did not (issue is on Google's end, but a failure nevertheless). This led me to seek out a way to prevent W3C's CSS validator from parsing Google's stylesheet and I came up with the following code:
Subscribe to:
Post Comments (Atom)
Transparent Images and Google Plus
Since Google changed the background colour for images in the Plus stream, transparent images containing black or dark-coloured text have ...


-
What is "click-to-play"? Click-to-play is a feature that allows the browser to defer loading of plug-ins such as Flash and Ja...
-
For the past few days, I had been having problems updating a local install of JCE via Joomla's auto-updater. So earlier this evening, I...
-
Since Google changed the background colour for images in the Plus stream, transparent images containing black or dark-coloured text have ...

No comments:
Post a comment