paper-radio-button label width is not constrained to the width of the container
Description
The label width of the paper-radio-button does not respect the width of the parent (paper-radio-button)
Expected outcome
It is expected that the label does not fall off the width provided to the paper-radio-button
Actual outcome
Please observe that the label (surrounded by a 1px solid black outline) is rendered outside of the paper-radio-button (cyan background color).
Steps to reproduce
- Put a containing div inside the page with some
background-color - Put the
paper-radio-buttonelement inside the container. Please give it a proper text that is bigger than 1 word. - Open the page in a web browser.
- Reduce the size of the browser and observe that the
paper-radio-buttonlabel is rendered outside of the containing div.
Browsers Affected
All browsers are affected. It is a browser independent issue.
I think the following solution for the issue might work: which is setting the width of the label to the following:
#radioLabel { width: calc(100% - var(--calculated-paper-radio-button-size, 16px) - var(--paper-radio-button-label-spacing, 10px)); }
According to the Pull Request guidelines only pull requests with tests will be considered. In a case like this, in which a visual 'glitch' is present is it necessary/possible to unit test the issue?