Overriding a theme's css1 user found helpful
I made the noob mistake of customizing the main.css file. Client hit update (good practice) and overwrote all my customizations (lame).
So, I came up with one idea that isn't ideal: Copy contents of theme within the install package and install in theme. Sucks though because I have to manually merge updates. This also requires one to copy over all custom blocks/ package-specific overrides to the top-level override directories (ran into some issues of what I think were relative-path issues when doing this for the document library block).
What I'd LIKE to do is copy the main.css (or whatever it's called) from the theme to the root override directory (/public_html/css) and have is override the theme's css while being safe from upgrades. Is that… possible? :)
Appreciate your time!
But yes, basically if you want to customize a theme other than customizations that are done through the dashboard, you are essentially making it your own theme - so as you mention you need to copy the theme folder from the package and put it in the root/themes folder, rename it to your own name to avoid conflicts, and then make that your theme.
As far as I am aware you shouldn't have to copy over any of the other parts of the theme, eg blocks, as they will still be available to you to use as long as the original theme package remains installed.
As you mention, any upgrades to the original theme would have to be manually merged, but as I see it, if you have a copy of the theme running successfully as your own custom theme, why would you want to merge any new css from the original anyway?
Those are my thoughts!
Thanks for the reply.
I think you're probably right. :)
I get these clients with 2 or 3 year old, heavily customized themes where there are legit compatibility updates and I thought it'd be 'cleaner' to override just like one does for other things. But you're right, it's not THAT big of a deal. :)
Thanks for your time!
This also means that I can easily swap from the cloned theme back to the original whenever I want during development (maybe to test something).
With theme layouts becoming more intelligent and more themes using LESS, I suspect I will be doing less cloning in the future and more simple patches.
Thanks. I was kinda hoping the global /css folder would be able to be put to use, but it's nice to know others have come to the same conclusion I have.
Side note: I looked at your CSS Quickie Add On - you are a stud.
when it was in peer review and it works really well.
Thanks for the link - it's an interesting Add On.
I do most of my coding in Coda/ Vim, and it's great. My question is more rooted in the proper use of overrides to ovoid update-conflicts. Thanks for the reply!