HTML_CSS
[ class tree: HTML_CSS ] [ index: HTML_CSS ] [ all elements ]

Source for file CSS_req12194_atrule_parser.php

Documentation is available at CSS_req12194_atrule_parser.php

  1. <?php
  2. header('Content-Type: text/plain');
  3. require_once 'HTML/CSS.php';
  4.  
  5. $cssDef = <<<EOD
  6. @import  url("foo.css") screen, print;
  7. @media screen { color: green; background-color: yellow; }
  8. @media    print {
  9.     blockquote { font-size: 16pt }
  10. }
  11. html { height: 100%; }
  12. @charset "UTF-8";
  13. @page thin:first  { size: 3in 8in }
  14. @font-face {
  15.     font-family: dreamy;
  16.     font-weight: bold;
  17.     src: url(http://www.example.com/font.eot);
  18. }
  19. EOD;
  20.  
  21. $css = new HTML_CSS();
  22. $css->parseString($cssDef);
  23.  
  24. echo $css->toString(. PHP_EOL;
  25.  
  26. var_export($css->toArray());
  27. ?>

Documentation generated on Mon, 11 Mar 2019 15:14:49 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.