Open robmckinnon opened 7 years ago
@aliuk2012 Did you get a chance to review this suggested spacing improvement? What do you think?
@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
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.
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.