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

Alignment issues with mdc-checkbox with an mdc-list-item #1591

Closed
djensen47 opened this issue Nov 15, 2017 · 5 comments · Fixed by #2049
Closed

Alignment issues with mdc-checkbox with an mdc-list-item #1591

djensen47 opened this issue Nov 15, 2017 · 5 comments · Fixed by #2049

Comments

@djensen47
Copy link

djensen47 commented Nov 15, 2017

Bug

mdc-checkbox causes alignment issues when used with mdc-list-item

What MDC-Web Version are you using?

0.24.0

What browser(s) is this bug affecting?

Chrome, Firefox, Edge

What OS are you using?

Windows 10

What are the steps to reproduce the bug?

  1. Create an two-line mdc list
  2. Include a span for mdc-list-item__start-detail and mdc-list-item__end-detail
  3. Put a checkbox in each span

or

  1. Include two checkboxes
  2. Use the class mdc-list-item__start-detail on one checkbox and mdc-list-item__end-detail on the other

What is the expected behavior?

Checkboxes are properly aligned and shaped.

What is the actual behavior?

Checkboxes are misaligned in the start-detail and end-detail sections when wrapped with <span class="mdc-list-item__start-detail"> or <span class="mdc-list-item__end-detail">

Checkboxes are misshaped and affect the alignment of the mdc-list-item

https://codepen.io/anon/pen/vWJWYL

@djensen47 djensen47 changed the title Alignment issues with mdc-checkbox in an mdc-list-item Alignment issues with mdc-checkbox with an mdc-list-item Nov 15, 2017
@djensen47
Copy link
Author

In the first example, wrapped, it's off by 8px on the top and 8px on the left.

@kfranqueiro
Copy link
Contributor

Incidentally, the mdc-list--avatar-list modifier makes the start detail element the exact right size to fit our checkboxes, but that doesn't solve the end detail case, which is also supposed to be possible.

Thanks for reporting this; I'm tracking it as a bug, as I think it might be worth examining whether we can make our existing styles more flexible rather than needing to add special cases for different types of components that are allowed in the start and end regions.

@djensen47
Copy link
Author

I didn't think to try avatar. Thanks for the suggestion, it's much better than my position workaround.

@moog16
Copy link
Contributor

moog16 commented Jan 23, 2018

Per commit: 5dabcdf#diff-d5738923465a810c2132e773f88f3d23, __start-detail has been renamed to __graphic, and __end-detail has been renamed to __meta.

I have updated the codepen here https://codepen.io/moog16/pen/wpZYOw?editors=1000. I do see an issue with alignment when the text is overflowing. I looked at spec and it doesn't have anything on the max-width, or if it should take the width of the longest row. I'm reaching out to the designer.

@moog16
Copy link
Contributor

moog16 commented Jan 23, 2018

Checked with designer - Text should ellipsis that overflows. It turns out that the ellipsis mixin was being used in mdc-list.scss, but not being applied. Fixing that bug.

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