This line in drupal.css is used to hide legends within vertical tabs:

.vertical-tabs .vertical-tabs-panes .vertical-tabs-pane legend { display:none; }

Unfortunately it also removes legends for fieldsets nested within vertical tabs panes.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dtarc’s picture

Status: Active » Needs review
FileSize
511 bytes

Patch attached

dtarc’s picture

Trying another patch to work with drush make.

dtarc’s picture

Assigned: dtarc » Unassigned

This may be a duplicate of a core issue: #1015798: Fieldsets inside vertical tabs have no title and can't be collapsed.

However, since Tao is explicitly setting those legends to "display:none" it will need to be fixed here even when it gets fixed in core:

.vertical-tabs .vertical-tabs-panes .vertical-tabs-pane legend { display:none; }

Also I notice that there is a similar issue in the Rubik queue: #1172040: Contrib solution for non-collapsible fieldsets and missing titles. With Tao being Rubik's base theme the fix should come here.

jonathan1055’s picture

Hi,
Issue #1172040: Contrib solution for non-collapsible fieldsets and missing titles is not in the Rubik issue queue, it is in Scheduler, where we use collapsible fieldsets which may be inside vertical tabs. I devised a way to fix the core problem within scheduler to allow our users to continue to use the D7 version. Originally it just fixed core themes, but now I have expanded the fix so that any specific theme which reports the problem can be corrected by scheduler until such time as the base theme is corrected.

In my patch there was also a specific correction for Rubik/Tao which was not a problem on Safari or Chrome but Firefox needed the fix. You are welcome to use it:

/* This is only required for the RUBIK theme. */
/* Add border and top padding to the actual content, which is the second nested div having class=fieldset-content */
div.vertical-tabs.rubik div.vertical-tabs-panes div.fieldset-content fieldset.titled div.fieldset-content {
  border: 1px solid #ccc;
  padding-top:2.5em;
}

The critical part is that it is the second div to have class=fieldset-content. I think this may be a fault in the html generation in core to have two levels of nested divs which both have the same class. I do not thinnk this is actually what was intended.

Jonathan

rickvug’s picture

Attached is an updated version of the patch in comment #1. I added a 1px padding-top to the fieldset, which fixes a bug that causes Chrome not to respect the 30px margin. I also incorporated the fieldset border from comment #4 but changed the color to #ddd to match the fieldset legend.

ericduran’s picture

Actually the patch should be a lot simpler.

Here's my fix. It just add the ">" being that we want the direct child not every legend to be hidden.

Patch attached also here are some screenshots of before and after:

Before:

before.png

After:

after.png

ericduran’s picture

Version: 7.x-3.0-beta3 » 7.x-3.x-dev

Also switching to dev since is still a problem there.

evanbarter’s picture

Status: Needs review » Reviewed & tested by the community

#6 works for me with scheduler, as advertised and I was also able to test it with Metatags. Let's get this in there, this has been an annoying problem for too long.

jonathan1055’s picture

For info, the core issue #1015798: Fieldsets inside vertical tabs have no title and can't be collapsed was committed to dev at the end of February, so it should appear in the next full release of D7.

haydeniv’s picture

Status: Reviewed & tested by the community » Postponed (maintainer needs more info)

Is this still an issue now that the core fix has been committed?

Dave Reid’s picture

It does in fact look like this is resolved with the core update.

haydeniv’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (duplicate)