. */ /* * A class to inline CSS. * * It honours !important attributes and doesn't choke on complex styles. * * */ class CSS { /** * @param string $contents * @return DomNode */ function inlineCSS($contents) { $html = pQuery::parseStr($contents); if (!$html instanceof DomNode) { throw new \InvalidArgumentException('Error parsing contents.'); } $css_blocks = ''; // Find all