Re-using Gtk2_VarDump | |
PEAR Manual | |
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_CSS::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() .
charset option defines the character encoding string. See also: HTML_CSS::setCharset() .
contentDisposition option contains the Content-Disposition filename. See also: HTML_CSS::setContentDisposition() .
lineEnd option sets the line end style to Windows, Mac, Unix or a custom string. See also: HTML_CSS::setLineEnd() .
groupsfirst option determines whether to output groups before elements. See also: HTML_CSS::setOutputGroupsFirst() .
allowduplicates option allow to have duplicate rules in selector.
HTML_CSS 1.4.0+ users may now set a single option directly like that:
|
Read and write single selector or even descendant selector is made easy with : HTML_CSS::getStyle() and HTML_CSS::setStyle()
The most advanced/complex functions are those which handle group of selectors HTML_CSS::createGroup() , HTML_CSS::unsetGroup() , HTML_CSS::getGroupStyle() , HTML_CSS::setGroupStyle() , HTML_CSS::addGroupSelector() , HTML_CSS::removeGroupSelector() , HTML_CSS::setSameStyle()
Handle data sources are so easy than just one call of these three methods : HTML_CSS::parseString() , HTML_CSS::parseFile() , and HTML_CSS::parseData()
Check validity of data source is now possible if you run HTML_CSS with PHP5. Use this function : HTML_CSS::validate()
Send result directly to browser, send it to file or capture to a PHP variable, you will certainly use one of them. HTML_CSS::toArray() , HTML_CSS::toInline() , HTML_CSS::toFile() , HTML_CSS::toString() , HTML_CSS::display() , HTML_CSS::getContentDisposition() , and HTML_CSS::setContentDisposition()
Ability to find if a selector or a property (with perl-compatible pattern) is already defined with HTML_CSS::grepStyle()
Important:
This function is available since version 1.1.0
List of at-rules supported can be obtained by call to function HTML_CSS::getAtRulesList()
Important:
All these related at-rules functions are available since version 1.5.0
Distinguish simple declarative at-rules (without declaration style blocks) : @charset, @import, @namespace, handled by : HTML_CSS::createAtRule() and HTML_CSS::unsetAtRule()
And conditional/informative at-rules (with declaration style blocks) : @media, @page, @font-face, handled by : HTML_CSS::getAtRuleStyle() and HTML_CSS::setAtRuleStyle()
Re-using Gtk2_VarDump | |
PEAR Manual | |