<?php
/*************************************************************
* This script is developed by Arturs Sosins aka ar2rsawseen, http://webcodingeasy.com
* Feel free to distribute and modify code, but keep reference to its creator
*
* CSSfix class can automatically apply vendor prefixes to specified CSS rules.
* It also applies other fixes, for different CSS browser specifics.
*
* For more information, examples and online documentation visit:
* http://webcodingeasy.com/PHP-classes/Automatically-add-CSS-vendor-prefixes
**************************************************************/
//declaring class instance
include("./CSSfix.php");
$css = new CSSfix();
$before = "
div
{
border-radius: 10px;
}
div
{
box-shadow: #123456 0 0 10px;
}
div.someclass
{
display: box;
opacity: 0.5;
}
";
$css->from_string($before);
$after = $css->generate(false);
echo "<table border='1px' cellpadding='10'>";
echo "<tr>";
echo "<td style='vertical-align: top;'><p>Before: </p><pre>".$before."</pre></td>";
echo "<td><p>After: </p><pre>".$after."</pre></td>";
echo "</tr>";
echo "</table>";
|