modifying parts of a css file via php
Posted: Wed Oct 26, 2005 12:58 pm
In my php script, I am parsing through some css code. It seperates out the classes and variables to form form text fields and whatnot. What I'd like to do is be able to modify the variables, so I was thinking...
Ok, I'll just have it search for that exact original variable (ie.. background-color: black;) and replace it with what i changed it to for example (ie background-color: red;). Then I realized that more than one class could have background-color: black.
So I guess my question is, how would I pick out and change a specific variable in a css file?
If this is unclear or you need some source, please ask. thanks in advance.
Ok, I'll just have it search for that exact original variable (ie.. background-color: black;) and replace it with what i changed it to for example (ie background-color: red;). Then I realized that more than one class could have background-color: black.
So I guess my question is, how would I pick out and change a specific variable in a css file?
If this is unclear or you need some source, please ask. thanks in advance.