Closed (won't fix)
Project:
Fusion
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
5 Apr 2011 at 06:04 UTC
Updated:
26 Jan 2013 at 01:13 UTC
Hi, and thank you for your work. I appreciate it.
I don't understand using the same class names for body classes as that of region classes.
Perhaps I "don't get it", but I try to use classes over id, so if I am overriding something like
#sidebar-second .sidebar-second
I would have a tendency of using
.sidebar-second {width: 180px;} for example
and I have then spent a silly amount of time trying to figure out why the layout doesn't work. It doesn't occur to me that body has the same class. It is just not how I think about it.
Let me know if I have to join the real world.
Comments
Comment #1
aquariumtap commentedHi js, these aren't added by Fusion. They're added by core.
In theme.ini:
Core looks for specific regions to try and identify sidebars, and adds classes to the body tag to assist with layout. I agree this can be confusing when trying to style the sidebar regions. It's possible for us to undo the classes added to the body tag by core, but we try not to go against the grain so themers who come with drupal-specific experience will do well by their assumptions.
Sorry for your troubles!
Comment #2
js commentedThanks for taking the time to explain, and your code. I hope it helps others as well. I would normally try to use class pointers in my CSS, but for the sidebars I have just switched to using the id.
Comment #3
jmcintyre commentedIf the classes are added in core, perhaps the sections of Fusion themes' starter CSS files that reference the classes should be amended? Example:
That seems to suggest that properties for sidebars should be added there... but that results in the properties applying to the body or its descendants. Perhaps these classes should be removed from the CSS, or IDs should be used instead as #2 mentioned. At least a note of explanation in the CSS comments could be helpful.