-1

I created a child theme based on the responsive i-transform theme http://templatesnext.org/itrans/, but in the end it feels like I'm spending a lot of time undoing the i-transform CSS. However, if I dequeue the entire parent stylesheet, things get out of whack because I used the default parent wrapper here, a div there, etc. While it runs fine with the parent stylesheet, it's very sloppy and I'm sure it slows down the page some to have all these layers of overridden CSS.

If I had the time, I could go through the 4000+ lines of the parent stylesheet and copy out what I need. But I'd rather not. Is there some way to get a clean copy of only the css that my pages use... the css that "wins" and is really being displayed, if that makes sense?

Amina
  • 90
  • 2
  • 12

1 Answers1

0

You can't, or at least not like you mean. You're trying to both create a new stylesheetand still want to use some of the code from the original stylesheet (the default wrapper you mention above). You can't completely ignore (i.e. delete) the original stylesheet and still use part of it.

If you still want to use part of the original stylesheet in your new one, just copy and paste the pertinent bits across.

Sinister Beard
  • 3,570
  • 12
  • 59
  • 95
  • Thanks. I was hoping I could get something like grunt-uncss to work as explained by Liam Gladdy [here](http://www.gladdy.uk/blog/2014/04/13/using-uncss-and-grunt-uncss-with-wordpress/). However it looks like it does not work over layers of CSS files, if I understand correctly. – Amina Jan 07 '15 at 15:33
  • Thank you, but it didn't quite answer the question because I wanted to avoid cutting/pasting selectively. However, I am planning to test the following idea: simply concatenate the parent/child stylesheets and then run a CSS cleaner on the final sheet to get rid of unused selectors. I also have found the following topic which seems to be similar to what I would like to do: http://stackoverflow.com/questions/12451354/tools-to-optimize-remove-redundancy-and-merge-css If that doesn't work, I will accept your answer. – Amina Jan 16 '15 at 15:21