-
Notifications
You must be signed in to change notification settings - Fork 334
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
Date input component spacing problem at very narrow widths #1250
Comments
We could consider using flexbox here... |
Hey @andysellick, This is a use case of this component that wasn't entirely expected, we tend to support something like this down to about 320px (inclusive of page gutter). When something like this is used on a larger screen but in a small container the smaller font size won't have kicked in so the component will also be bigger than if it was 100% of a smaller screen. There's a couple of options if you want to get this working for you now, a) Depending on what you're doing with the other components in the refine panel you could reduce the font size to 16px which will also reduce the size of the inputs. I wouldn't imagine you'd want to do this unless all of the other form elements were also 16px b) Create your own modifier for the input widths. Currently the widths are defines by the classes They are a little bigger than they'd actually need to be so you could delete these classes, and make your own modifier of the A small tweak would be to change the year from |
Since date input items use Adding |
Closing this for now, as the original issue has been addressed. We'll review Colin's proposed solution separately. Thanks everyone |
If the date input is in a small enough space that it is forced to wrap, there's not enough vertical spacing between the label and the inputs above (see screenshot). Seems to occur if the component is in a container less than 200px wide.
This might seem unlikely to occur in the wild but we eventually want to use the date input component in finders to replace the existing single input field (for example on the news and communication finder). Here the component would be in a narrow side column that can be reduced to a width less than 200px before hitting the mobile break point.
(there is some right margin on the 'year' input that could be removed, possibly, although that wouldn't completely solve the issue)
The text was updated successfully, but these errors were encountered: