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

modal bug: inputs should span the full width #8373

Closed
aagonzales opened this issue Apr 12, 2021 · 2 comments · Fixed by #9700
Closed

modal bug: inputs should span the full width #8373

aagonzales opened this issue Apr 12, 2021 · 2 comments · Fixed by #9700

Comments

@aagonzales
Copy link
Member

This is a regression: the inputs should be spanning the full width of the modal.

Storybook:
image

Should be:
image

@tw15egan
Copy link
Member

@aagonzales we have a hasForm prop that allows things to span the full-width of the Modal, but it will also let the paragraph above go full width.

The problem I think we're running into is that we are allowing consumers to render whatever they want inside of a modal, and the modal body has a varying padding-right based on the size of the screen. Since the inputs are also put inside the Modal body, they are affected by this as well (unless the hasForm prop has been provided). But like I pointed out, that will allow everything to go full width.

Is the main reason for the right padding to constrain full-width paragraphs? If so, I wonder if we can just set the padding on all paragraph elements inside of the Modal. We already set the font styles for all paragraphs, so we would just be moving the padding from the modal body container to just the paragraphs.

@aagonzales
Copy link
Member Author

aagonzales commented Apr 13, 2021

Yeah it would just be for paragraphs text that would be at the 20% padding. Everything else is full width. The storybook example was correct at some point in the past.

The exception is the xs modal. https://www.carbondesignsystem.com/components/modal/style#margin-right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants