What if you have a CSS template that’s really nice, and you want to use it with a wordpress theme, but don’t want to edit all the theme files to use the rules in the CSS template? Is there a way to create a CSS file that acts as a proxy between the new CSS template and old WP theme?
Share
Good question! I’m afraid I think there is no native way. There would have to be a syntax like
which doesn’t exist in CSS proper.
It could probably be done, though, using a CSS pre-compiler like LeSS. LeSS’s “Mixins” function looks like it might do exactly what you need. From their front page:
where
rounded_cornerswould be your original class definition, and#headerthe WordPress equivalent.