Active
Project:
Marinelli
Version:
7.x-3.0-beta11
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
2 Feb 2011 at 16:54 UTC
Updated:
11 Jun 2011 at 04:06 UTC
How should I do to make CSS3 changes in a subtheme?
Comments
Comment #1
menlo624 commentedI do have exactly the same question. I'd love to modify the css3 style sheets, but just cannot make it work.
Otherwize, great style! Thanks
Comment #2
jdub110 commentedI am also struggling with the same issue. I want to change the colors of the menu tabs.
Comment #3
Lioz commentedhave you tried to copy the css3 folder of the main theme and paste it in you /css subtheme folder?
you should be able to edit those files and modify subtheme's css3 styles.
Let me know if it works.
Comment #4
jdub110 commentedI tried to do that, but there is some code in the template.php file that loads the css3 style sheets on the fly if that setting is set in the theme config. I tried to make my own copy of the template.php in my subtheme, but couldn't get it to work. I'm a drupal noob, so I'm probably missing something simple.
Comment #5
Lioz commented@jdub110 you are right, path_to_theme() seems to point the base theme not the active subtheme
try to replace the html preprocess function in template.php with this code
Let me know if it works!
Comment #6
jdub110 commentedThanks so much for your help!! I think I have it all working now!!!
I did have to make one minor change from what you suggested...
I changed drupal_add_js(path_to_theme() to
drupal_add_js($path_to_theme and copied the js dirs and file into my subtheme folder.
Thanks again!
Comment #7
Lioz commented@jdub110 I think it's not necessary to change the js path since it can be linked from the base theme. It should work without your change, let me know.
Comment #8
jdub110 commented@Lioz I changed it back to your original code and you were correct it works. When I was trying to get this working, I had introduced an error into the .css file that stopped things from working, and I misdiagnosed the problem.
Thanks again for your help!
Comment #9
Lioz commentedComment #11
manicolaus commentedThe current download (7.x-3.0-beta9) incorporates the updated code Lioz posted Feb. 11 above. But I found by experiment that it is also necessary to copy the css folder from the main theme to the subtheme folder in order to make the css3 effects work.
Comment #12
mattez commentedConfirmed. 3D effects will begin work only after copying directory "css3" into mysubtheme/css/. I'm not a programmer, but it seems that the variable "$ path_to_theme" returning path of subtheme.
I changed this "drupal_add_css($path_to_theme ..." to "drupal_add_css(path_to_theme() ..."
And It works without copying folder!
Comment #13
danepowell commentedIt seems that the problem has flipped from one of not being able to override css3 in a subtheme, to being forced to override css3. This breaks Drupal theming standards- css files should always be automatically inherited from a base theme. FYI, the same problem now exists for reset.css in beta11.