Created
February 26, 2012 13:33
-
-
Save KitaitiMakoto/1916749 to your computer and use it in GitHub Desktop.
PHP-CSS-ParserのDeclarationBlockは__toString()が使える ref: http://qiita.com/items/2837
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require(dirname(__FILE__) . '/../CSSParser.php'); | |
$cssFile = 'epub/OEBPS/stylesheet.css'; | |
$parser = new CSSParser(file_get_contents($cssFile)); | |
$css = $parser->parse(); | |
foreach ($css->getAllDeclarationBlocks() as $db) { | |
echo $db, PHP_EOL; | |
echo '---------------------------------------------', PHP_EOL; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment