diff options
author | David Flatz | 2014-12-10 16:58:02 +0100 |
---|---|---|
committer | David Flatz | 2014-12-10 16:58:02 +0100 |
commit | d8990b87dba2105d4b772a45aaa8a3857dd0e509 (patch) | |
tree | e26e9892be9bf56c3ec28841df9a61f283b9f802 /itjs.php | |
parent | 7c7ea13338e9a541fadd807c599eecadd6a962a7 (diff) | |
download | itools-d8990b87dba2105d4b772a45aaa8a3857dd0e509.tar.gz itools-d8990b87dba2105d4b772a45aaa8a3857dd0e509.tar.bz2 itools-d8990b87dba2105d4b772a45aaa8a3857dd0e509.zip |
inject ie polyfils in css when browser is ie 8 or older
Diffstat (limited to 'itjs.php')
-rw-r--r-- | itjs.php | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -59,6 +59,12 @@ else if (it::match('\.css', $file)) '([^/])\*(\w)' => '$1$2'), $data ); + if ((($ie = it::match('MSIE (\d+)', $_SERVER['HTTP_USER_AGENT'])) && intval($ie) < 9) || EDC('iecompat')) + $data = it::replace(array( + '([;{]\s*)(background-size:[^;}])' => '\1behavior:url(/itjs/ie-backgroundsize-min.htc);\2', + '([;{]\s*)(border-radius:[^;}]*)' => '\1behavior:url(/itjs/ie-PIE.htc);\2'), + $data + ); } else if (it::match('\.htc$', $file)) { |