I'm sure there was a reason for this at some point, but it's annoying that uc_product.css contains declarations for h3.title (line 40). That's a standard selector that is output on a lot of theme's sidebar blocks (e.g. Basic) and I have to manually override it on every site that uses Ubercart.

I'm assuming that it has to do with Ubercart's default product list, but it's a bit obnoxious for a contrib module to hijack such a common selector.

I can provide a patch if there is no real need for it.

CommentFileSizeAuthor
#4 removeSelectors-1163126-4.patch299 bytesbalsama
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

I can't even see anywhere that Ubercart outputs <h3 class="title"> - the only use of h3 seems to be for attribute titles, and they don't have a class specified - so it does look like this can be removed entirely. Are there any other selectors that should be removed at the same time?

balsama’s picture

Possibly this one:
.node-form tbody {
border: none;
margin: 0;
}

Is it there to fix a problem when editing/creating products perhaps?

longwave’s picture

That one fixes an annoying rule in /modules/system/system.css:

tbody {
  border-top: 1px solid #CCCCCC;
}

The price fields on the node edit form are displayed using a table, and the top border is unnecessary - bad semantics, but it looks like we can change .node-form tbody to .node-form .product-field tbody at least.

balsama’s picture

Oh yeah. I know that rule.

Here's a patch that removes h3.title and it's rules from uc_product.css

longwave’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, removeSelectors-1163126-4.patch, failed testing.

longwave’s picture

Status: Needs work » Fixed

Committed to both branches.

Status: Fixed » Closed (fixed)

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