Initialize
parser/writer options
With the class constructor, you have ability to set many options :
-
xhtml option defines
whether element selectors should be automatically lowercased. See
also:
HTML_CSS::setXhtmlCompliance()
.
-
tab option defines the
string used to indent CSS text. See also:
HTML_Common::setTab()
.
-
filename option allow
to parse an external css file. See also:
HTML_CSS::parseFile()
.
-
cache option controls
caching of the page. See also:
HTML_CSS::setCache()
.
-
oneline option defines
whether to output all properties on one line. See also:
HTML_CSS::setSingleLineOutput()
.
-
groupsfirst option
determines whether to output groups before elements. See also:
HTML_CSS::setOutputGroupsFirst()
.
-
allowduplicates option
allow to have duplicate rules in selector.
|
Tip
|
HTML_CSS 1.4.0+ users may now set a single option directly like
that:
-
<?php
-
require_once 'HTML/CSS.php';
-
-
$css = new HTML_CSS();
-
-
// with PHP5 only
-
$css->allowduplicates = true;
-
-
// with PHP4 only
-
$css->__set('allowduplicates', true);
-
?>
|