HTML_CSS : The Definitive Guide |
This example give you ability to find if a selector is defined
($style1
) and get all properties values.
This example give you also ability to find in which selector a
property is defined ($style2
).
Suppose we have this stylesheet :
Example 11.5. Searching for selectors and properties
Load the stylesheet definition. You may also load it by other
methods such as HTML_CSS::parseString()
or HTML_CSS::parseData()
.
We set here the Perl pattern definition to find all selectors
(single or group) beginning by #PB1
.
We set here the Perl pattern definition to find all selectors
(single or group) that have a color
property defined.
HTML_CSS : The Definitive Guide | v 1.5.0 : January 15, 2008 |