. */ /* * A class to inline CSS. * * It honours !important attributes and doesn't choke on complex styles. * * */ class CSS { /* * The core of the algorithm, takes a URL and returns the HTML found there with the CSS inlined. * If you pass $contents then the original HTML is not downloaded and $contents is used instead. * $url is mandatory as it is used to resolve the links to the stylesheets found in the HTML. */ function inlineCSS($url, $contents=null) { $html = \pQuery::parseStr($contents); if(!is_object($html)) { return false; } $css_blocks = ''; // Find all