So, radix_layouts is meant to be used in any theme! However, it uses some classes which are commonly used by many themes, for example: "content", "sidebar", "header" and "footer".

When using radix_layouts in a theme that uses any of those classes, the layout can pickup undesirable styling. I found this with the responsive_bartik theme and the "content" and "sidebar" classes. For "content" it added some padding to the bottom of the region and "sidebar" changed the styling of any "h2" tags in the region.

While I would be OK with working around responsive_bartik's styling in Panopoly, this has the potential to cause problems in a pethora of other themes! I'd probably be safer to change these to different classes that won't conflict.

I propose prefixing them with "radix-" (or "radix-layouts-"), so they'd become, for example: "radix-content", "radix-sidebar", etc..

Comments

shadcn’s picture

Status: Active » Needs work

I agree with this.

But I think we should use a generic class name like panels-header or panels-sidebar.

Some developers might not like polluting their html with Radix everywhere :)

dsnopek’s picture

Well, even though Panels isn't using those classes now, it would be best to use a namespace that we own. If we use panels-header and then later the Panels module decides to do something with that, we're in this same problem again. :-/ Personally, I don't think developers will care that it says radix everywhere - in fact, it'll make sense because these layouts come from radix_layouts!

The most verbose name would probably be the most correct namespaces-wise, which would be like radix-layouts-header, etc. But that's a lot of characters and since you are also the maintainer of Radix and have control over the radix namespace, shortening to just radix-header seems fine.

Hopefully, both Panels and Radix Layouts will be around for a really, really long time. Like, not just the Drupal 7 versions, but also Drupal 8, 9, etc. So, who knows what Panels is going to do in it's CSS in Drupal 8, and wouldn't it be great to not have to change our class names? ;-)

  • arshadcn committed 4b99d06 on 7.x-3.x
    Issue #2374637 by dsnopek: Prefix classes with commonly used names, like...
shadcn’s picture

I made the changes and pushed to the latest dev.

shadcn’s picture

klu’s picture

Thanks @arshadcn and @dsnopek! I'll echo that prefixing with "radix-layouts-" makes sense to me since this is the Radix Layouts module!

dsnopek’s picture

Thanks, Arshad! I reviewed the commit, and unfortunately found some inconsistencies - uploaded a patch here: #2376635: Minor class name inconsistencies

shadcn’s picture

  • arshadcn committed 4b99d06 on 8.x-3.x
    Issue #2374637 by dsnopek: Prefix classes with commonly used names, like...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.