I have the following css code
h1, h2, h3, h4 {
color: #333;
font-size: 12px;
}
i would like to split this up into an php array e.g.
array(
h1 => array(
color => #333
font-size => 12px )
h2 => array(
color => #333
font-size => 12px )
h3 => array(
color => #333
font-size => 12px )
h4 => array(
color => #333
font-size => 12px )
)
Does anyone know how would I go about doing this?
Thanks
The following code works in most, but not all cases:
It does not work with @ rules, opening braces in selectors, closing braces or semicolons in declarations, and a few more exotic cases.
(please note: I fixed a bug in the above code half a year after it was accepted)