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:
$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' />" );

2 comments:

  1. ‘한반도 인권과 통일을 위한 변호사 모임’(회장 김태훈 변호사, 이하 한변)과 ‘올바른 북한인권법을 위한 시민모임’(이하 올인모)이 6일 국회의사당 앞에서 제118차 화요집회를 개최했다. 먼저 이애란 북한인권총연합 상임대표는 “현재 북한인권재단 창설의 문도 못 열게 하는 야만적 행태가 지속되고 있다. 대한민국 문재인 대통령, 공직자, 장관 등 북한인권 문제와 관련된 책임 있는 사람들이 조속히.. 단, 쿠폰 및 마일리지, 통합포인트, e교환권 사용 시 적립 예정 통합포인트가 변동될 수 있으며 주문취소나 반품시에는 적립된 통합포인트가 다시 차감됩니다. 다른 고객이 작성리뷰에 대해 온카지노 불쾌함을 느끼는 경우 신고를 할 수 있으며, 신고 자가 일정수준 이상 누적되면 작성하신 리뷰가 노출되지 않을 수 있습니다. (주)올인보험대리점 및 연관기업의 정보를 보다 상세히 제공합니다.

    ReplyDelete
  2. Sit again, loosen up and play on your subsequent win whereas looking over the primary on line casino motion. Our new on line casino map permits you to discover your favorite games and know if they are 로스트아크 occupied or free for play. Please enroll or sign into your My Club Serrano account to use your resort offers and reductions. Note that the content material on this website shouldn't be thought-about betting recommendation. This website is free for you to can} use but we might receive commission from the businesses we function on this web site.

    ReplyDelete

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 ...