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

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