Skip to content
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

FileInput is not adjusting to Grid #1733

Open
remyvdwereld opened this issue Nov 1, 2024 · 4 comments
Open

FileInput is not adjusting to Grid #1733

remyvdwereld opened this issue Nov 1, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@remyvdwereld
Copy link

remyvdwereld commented Nov 1, 2024

Describe the issue

The FileInput component is not adjusting to the Grid. I need to add a width of 100% to achieve this.

Check the difference in this example with a TextInput.

Sandbox

@RubenSibon RubenSibon added the bug Something isn't working label Nov 1, 2024
@RubenSibon
Copy link
Contributor

Thanks for submitting the report! The Sandbox link does not seem to work (for me at least). Can you provide steps to reproduce this issue as an alternative as well?

is it possible to remove the default padding-left in a grid? Or create a property for this?

Can you make a separate issue for this? I know it's cumbersome, but would keep the scope of the issues more clear. You could point to the same Sandbox, though.

@RubenSibon
Copy link
Contributor

Thanks, but no thanks @lattaai1.

@dlnr
Copy link
Contributor

dlnr commented Nov 7, 2024

If this is a requirement for your form you could add some CSS:

input[type="file"] {
  inline-size: 100%;
}

Until we add this to the component of course.

@VincentSmedinga
Copy link
Contributor

I agree that File Input should be 100% wide, just like our comparable input components; at least until we have more advice on sizing and arranging form fields. This creates a common baseline and lets the fields better adapt to local layout styles. I’ve made a PR to implement this and will update this issue as soon as that has been released.

Note that the suggestion above requires box-sizing: border-box; and best uses .ams-file-input as the selector.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

5 participants
@VincentSmedinga @dlnr @RubenSibon @remyvdwereld and others