How do you rename CSS rules?

What if you have a CSS template that is really good and you want to use it with a wordpress theme but don’t want to edit all the files in order 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 the old WP theme?

+5
source share
2 answers

Good question! I'm afraid I think there is no home way. There should be syntax like

propertyname: inherit-from(.classname);     // Fictitious example! Does not work

which does not exist in CSS itself.

, , CSS, LeSS. LeSS "Mixins" , , . :

.rounded_corners (@radius: 5px) { 
  -moz-border-radius: @radius;
  -webkit-border-radius: @radius;
  border-radius: @radius;
}

#header {  
  .rounded_corners;  
}

rounded_corners , #header WordPress.

+1

All Articles