ix icon indicating copy to clipboard operation
ix copied to clipboard

Checkboxes with multiline label overlap each other

Open Stefei opened this issue 10 months ago • 2 comments

Prerequisites

  • [X] I have read the Contributing Guidelines.
  • [X] I have not leaked any internal/restricted information like screenshots, videos, code snippets, links etc.

What happened?

Stacking multiple checkboxes with multiline labels results in them overlapping each other:

grafik

What type of frontend framework are you seeing the problem on?

Angular, JavaScript

Which version of iX do you use?

v2.1.0

Code to produce this issue.

<div style="display: flex; flex-direction: column">
    <input type="checkbox" id="checkbox_01" />
      <label for="checkbox_01">Long Label 1: Lorem ipsum dolor sit amet, consetetur sadipscing elitr</label>
      <input type="checkbox" id="checkbox_02" />
      <label for="checkbox_02">Long Label 2: Lorem ipsum dolor sit amet, consetetur sadipscing elitr</label>
      <input type="checkbox" id="checkbox_03" />
      <label for="checkbox_03">Long Label 3: Lorem ipsum dolor sit amet, consetetur sadipscing elitr</label>
    </div>

Stefei avatar Apr 17 '24 12:04 Stefei

Hi @Stefei , You can manipulate it your side like:

<div style="display: flex; flex-direction: column">
  <input type="checkbox" id="checkbox_01" />
    <label style="display:block; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width: 90%;" for="checkbox_01">Long Label 1: Lorem ipsum dolor sit amet, consetetur sadipscing elitr</label>
    <input type="checkbox" id="checkbox_02" />
    <label style="display:block; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width: 90%;"  for="checkbox_02">Long Label 2: Lorem ipsum dolor sit amet, consetetur sadipscing elitr</label>
    <input type="checkbox" id="checkbox_03" />
    <label style="display:block; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;max-width: 90%;"  for="checkbox_03">Long Label 3: Lorem ipsum dolor sit amet, consetetur sadipscing elitr</label>
  </div>

result is like: image

Other way is arrange the height of label:

  <div style="display: flex; flex-direction: column;margin-top: 4rem;">
    <input type="checkbox" id="checkbox_01" />
      <label style="height:unset; max-height: unset;" for="checkbox_01">Long Label 1: Lorem ipsum dolor sit amet, consetetur sadipscing elitr</label>
      <input type="checkbox" id="checkbox_02" />
      <label style="height:unset; max-height: unset;" for="checkbox_02">Long Label 2: Lorem ipsum dolor sit amet, consetetur sadipscing elitr</label>
      <input type="checkbox" id="checkbox_03" />
      <label style="height:unset; max-height: unset;" for="checkbox_03">Long Label 3: Lorem ipsum dolor sit amet, consetetur sadipscing elitr</label>
    </div>

result is like:

image

it is up to you

ridvandmrc avatar Apr 25 '24 11:04 ridvandmrc

Will be closed by #1273

nuke-ellington avatar May 10 '24 13:05 nuke-ellington