Problem/Motivation

When a radios, checkboxes, fieldset or fieldgroup element is child of a fieldset or fieldgroup element, their legend positions are messed up.

Screenshot:

Proposed resolution

Fix <legend> CSS.

Remaining tasks

User interface changes

API changes

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Arla’s picture

Status: Active » Needs review
FileSize
467 bytes
32.93 KB

Screenshot of fix:

idebr’s picture

@Arla I'm having trouble reproducing this error. Can you provide an example URL or code?

LewisNyman’s picture

Component: CSS » Seven theme
Issue tags: +frontend

Is this when you have two legends inside of a fieldset?

Arla’s picture

For an example, apply this (silly) patch and check the page at admin/config/development/logging

Manjit.Singh’s picture

nathanlawsn’s picture

Status: Needs review » Needs work
FileSize
81.04 KB
51.5 KB
54.48 KB

Patch in #4 reproduces this error.

Screenshot showing error with legends overlapping

Applying the original patch in #1 fixes the issue with the legends overlapping but the fieldset legend no longer sits inline with the border. Should this be the case?

Screenshot showing the issue has been fixed but results in other issues

Should it not look more like this?

Screenshot showing the issue has been fixed but results in other issues

Manjit.Singh’s picture

@nathanlawson91 I did not found any fieldsets on admin/config/development/logging

Where can i check these fieldsets ?

emma.maria’s picture

@Manjit.Singh for some reason you need to apply the patch in #4 to see the issue. I cannot figure out why though. Maybe ping the Seven maintainer @lewisnyman for more info.

LewisNyman’s picture

Yeah, you have to apply the do-not-test.patch to provide an example of a fieldset. We don't have any in core but contrib will have them.

LewisNyman’s picture

The design of the fieldset should follow the design in https://groups.drupal.org/node/283223

Manjit.Singh’s picture

@Emma Thanks for the help. But is there any need to apply fieldset here.

LewisNyman’s picture

@Manjit.Singh No, it's just an example implementation

jeni_dc’s picture

Changing the fieldset CSS to only select the direct child legend fixes the overlap. I've attached a patch with the quick change.

jeni_dc’s picture

Status: Needs work » Needs review
MrPaulDriver’s picture

FileSize
117.24 KB

Patch at #13 seems to fix

2498163 success

MrPaulDriver’s picture

Status: Needs review » Reviewed & tested by the community

Visual check indicates problem resolved as per screen shot in previous post. Code appears fine.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 231b59f and pushed to 8.0.x. Thanks!

  • alexpott committed 231b59f on 8.0.x
    Issue #2498163 by Arla, jeni_dc, nathanlawson91, MrPaulDriver,...

Status: Fixed » Closed (fixed)

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