kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
85 stars 23 forks source link

[BUG] Slotted text inside checkbox and radio does not wrap #3648

Closed RasmusKjeldgaard closed 1 month ago

RasmusKjeldgaard commented 1 month ago

Describe the bug

When slotting text inside kirby-checkbox or kirby-radio text does not wrap, but remains on one line. This can result in text being clipped.

When using the text-property text correctly wraps, and I would expect slotted text to be identical.

Describe how to reproduce the bug

Add two checkboxes or radios where one has slotted text and the other uses the text-property:

<kirby-checkbox text="Lorem ipsum dolor sit amet, consectetur adipiscing elit,
 sed do eiusmod tempor incididunt ut labore et dolore 
 magna aliqua."></kirby-checkbox>

<kirby-checkbox>
  Lorem ipsum dolor sit amet, consectetur adipiscing elit,
   sed do eiusmod tempor incididunt ut labore et dolore 
   magna aliqua.
</kirby-checkbox>

This results in slotted text on one line, which is clipped:

image

Which Kirby version was used?

9.7.0

What was the expected behavior?

When using the text-property text correctly wraps, and I would expect slotted text to be identical.


Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Verification

To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review: