diff options
author | Urban Müller | 2015-01-08 20:19:58 +0100 |
---|---|---|
committer | Urban Müller | 2015-01-08 20:19:58 +0100 |
commit | 88735768b9a0c4f41a5f8ed32c5c71c9d162c2b9 (patch) | |
tree | 88e78a541e0f35fb787da4b65bbb6632270639d9 /itjs.php | |
parent | 1ca17962a2df0254ac4db0724d167351983c99e4 (diff) | |
download | itools-88735768b9a0c4f41a5f8ed32c5c71c9d162c2b9.tar.gz itools-88735768b9a0c4f41a5f8ed32c5c71c9d162c2b9.tar.bz2 itools-88735768b9a0c4f41a5f8ed32c5c71c9d162c2b9.zip |
remove nonvalidating css in w3 mode
Diffstat (limited to 'itjs.php')
-rw-r--r-- | itjs.php | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -48,15 +48,18 @@ else if (it::match('\.css', $file)) $data .= "\n#it_boot_dom { display:none }\n"; # Append magic style for it_boot if (!it::match('^devel', $GLOBALS['ULTRASERVERTYPE'])) $data = it::replace(array('[ \t]*([{};])[ \t]*' => '$1', '/\*.*?\*/' => ""), $data); - if (it::match('W3C_CSS_Validator', $_SERVER['HTTP_USER_AGENT']) || EDC('w3c')) + if (it::match('W3C_CSS_Validator', $_SERVER['HTTP_USER_AGENT']) || $_GET['w3c']) $data = it::replace(array( - '@-.*' => "", + '@-.*|@page.*' => "", 'background[^;}]*(gradient|rgba)[^;}]*;?' => "", - '(filter:\s*(progid|none)|text-overflow:|zoom:|-webkit-|display:-moz-|-moz-|-o-|cursor:|border-radius:|behavior:|\w+:expression)[^;}]*;?' => "", + '::-webkit[^ ,{]*' => '.foo', + '\n:.*' => "\n", + '(filter:\s*(progid|none)|text-overflow:|zoom:|-webkit-[-\w]:|display:-moz-|-moz-|-o-|cursor:|border-radius:|behavior:|text-rendering:|\w+:expression:|[-\w]*appearance:)[^;}]*;?' => "", 'pointer-events:[^;}]*' => "", 'html\.ie6.*' => "", ':valid:' => ":", # hack for iOS datetime - '([^/])\*(\w)' => '$1$2'), + '([^/])\*(\w)' => '$1$2', + ), $data ); if ((($ie = it::match('MSIE (\d+)', $_SERVER['HTTP_USER_AGENT'])) && intval($ie) < 9) || EDC('iecompat')) |