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

Radio Button Size Attribute Not Working #1315

Closed
shawnhancock opened this issue Apr 26, 2023 · 1 comment
Closed

Radio Button Size Attribute Not Working #1315

shawnhancock opened this issue Apr 26, 2023 · 1 comment

Comments

@shawnhancock
Copy link

The Size attribute for the Radio Button (https://shoelace.style/components/radio-button) doesn't work in 2.4.0. They are all set to 'Medium' despite having different sizes applied. This can be seen in website page above.

Seems to be working in version 2.3.0.

@claviska
Copy link
Member

A missing size attribute was added to <sl-radio-group> in 2.4.0 that's overriding your existing size attribute.

Instead of setting the size on radios and radio buttons, set it on the radio group instead:

<sl-radio-group label="Select an option" size="large" value="1">
  <sl-radio value="1">Large 1</sl-radio>
  <sl-radio value="2">Large 2</sl-radio>
  <sl-radio value="3">Large 3</sl-radio>
</sl-radio-group>

Note that the size attribute hasn't been removed from radio/radio button. You can still use it in compositions outside of <sl-radio-group> but, like other form controls, the size is now correctly determined by the controlling element.

While this was fixed in 2.4.0, I neglected to update the examples in the docs. This has been fixed in f136b8e.

I hope that helps!

jeysonj2 pushed a commit to circular-o/circular that referenced this issue May 23, 2023
jeysonj2 added a commit to circular-o/circular that referenced this issue May 23, 2023
jeysonj2 added a commit to circular-o/circular that referenced this issue May 23, 2023
yuki24 pushed a commit to yuki24/shoelace that referenced this issue May 28, 2023
KonnorRogers pushed a commit that referenced this issue Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants