-
Notifications
You must be signed in to change notification settings - Fork 335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add width
classes
#413
Add width
classes
#413
Conversation
If these change the widths of the components, is this something that can be done with the other utility/helper classes? |
The |
8efdd68
to
5c159a1
Compare
Fixed now. |
The classes feel like they're a lot more generic than just form controls – but I'm not sure what a good name for them would be. Also, they need to be wrapped in an |
I have a feeling that these classes might not need to exist if they were wrapped in something that limits line-length, since that seems to be the purpose of these classes. This would mean the text and the inputs could share the same method of limiting the width without using a grid. (Would allow the use of |
I remember @dashouse iterated the idea of using |
5c159a1
to
87770f6
Compare
Thanks @36degrees, I've added a |
87770f6
to
298112f
Compare
This PR can now be reviewed. After various conversations, the classes are now width overrides. I've updated the PR description accordingly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
298112f
to
6f1607a
Compare
I think my comment got lost in the ether. Is it an issue that the grid uses "two-thirds" and the width classes use "2-3"? |
6f1607a
to
9820f90
Compare
9820f90
to
6e25474
Compare
@dashouse: The naming is now consistent with |
Update on naming looks good Only concern is |
These classes correspond to form-control classes used in Elements but extend their use case Make them into override classes because they need to be available to input, select and textarea components while overriding their width styles. Helpers do not override component styles and as overrides, they are also available to use cases such as setting width of text Make naming of numbers in classes consistent with `govuk-o-grid` Add examples to /examples/form-alignment (and close an unclosed form tag in the example above)
6e25474
to
796292e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@dashouse As per our chat just now, I've removed the |
This PR
width
classes, corresponding toform-control
classes used in Elements but extending their use caseinput
,select
andtextarea
components while overriding their width styles. Helpers do not override component stylesgovuk-o-grid
form
tag in the example above)Trello ticket: https://trello.com/c/jEhFTAqY/458-add-width-form-control-in-elements-classes
Notes:
There is an old comment by Gemma in Elements about updating these form controls but it's not clear what that would have referred to. Just in case it jogs anyone's memory 🙂