Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

Add margin below legend via .heading-medium class #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

robmckinnon
Copy link
Contributor

To obtain a bigger margin between legend text and new radio/checkbox buttons, set class .heading-medium on legend element.

This is similiar to the way the GOV.UK elements guide uses .heading-medium on the h1 elements in their examples.

Without this change the legend text appears too close to radio/checkbox buttons, due to zero margin between them.

To obtain a bigger margin between legend text and new radio/checkbox
buttons, set class .heading-medium on legend element.

This is similiar to the way the GOV.UK elements guide uses
.heading-medium on the h1 elements in their examples.

Without this change the legend text appears too close to the
radio/checkbox buttons, due to zero margin between them.
@robmckinnon
Copy link
Contributor Author

@aliuk2012 Did you get a chance to review this suggested spacing improvement? What do you think?

@aliuk2012
Copy link
Contributor

aliuk2012 commented Mar 21, 2017

@robmckinnon I did, it is fairly straight forward, I'm busy thinking of how much impact this might have to those already using the gem and whether it should go into a major/minor version release.

I am testing it on a few services I know use the existing gem to see if it might have some weird effect on them

@dankmitchell
Copy link
Contributor

This PR is a great step towards what is recommended by gov.uk element but I think the class name should be an option and not hardcoded.

gov.uk elements recommend a hidden class (visually-hidden) on the legend and then a heading outside of the fieldset so by adding the class name as an option you are giving the developer more flexibility.

Copy link
Contributor

@dankmitchell dankmitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We just need a show/hide option for the legend element and then the users can add their own heading-medium outside of the fieldset

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants