diff --git a/docs/docs/native/radio.md b/docs/docs/native/radio.md index b3c222e58..6649695b3 100644 --- a/docs/docs/native/radio.md +++ b/docs/docs/native/radio.md @@ -11,8 +11,8 @@ file: styles/native/radio.css ```html {.example}
- - + +
``` @@ -24,9 +24,9 @@ To set the initial value and checked state, use the `checked` attribute on the c ```html {.example}
- - - + + +
``` @@ -36,9 +36,9 @@ Use the `disabled` attribute to disable a radio. ```html {.example}
- - - + + +
``` @@ -49,26 +49,26 @@ Use the [size utilities](/docs/utilities/size) to change the radios' size. ```html {.example}
Small - - - + + +

Medium - - - + + +

Large - - - + + +
``` @@ -78,16 +78,16 @@ You can wrap native radios in a flex container to give them a horizontal or vert ```html {.example}
- - - + + +
``` ```html {.example}
- - - + + +
``` diff --git a/docs/docs/resources/changelog.md b/docs/docs/resources/changelog.md index 700ca9040..8ace09e29 100644 --- a/docs/docs/resources/changelog.md +++ b/docs/docs/resources/changelog.md @@ -15,10 +15,11 @@ During the alpha period, things might break! We take breaking changes very serio ## Next - 🚨 BREAKING: Renamed `` to `` and improved compatibility for non-image content +- Added support for Duotone Thin, Light, and Regular styles and the Sharp Duotone family of styles to `` - Fixed a bug that caused `` to have an undesired margin below it - Fixed a bug in `` that caused incorrect spacing of icons - Fixed a bug in the Matter theme that prevented clicks on form control labels to not focus the control -- Added support for Duotone Thin, Light, and Regular styles and the Sharp Duotone family of styles to `` +- Improved native radio alignment ## 3.0.0-alpha.12 diff --git a/src/styles/native/radio.css b/src/styles/native/radio.css index dbd67fb55..8715834b6 100644 --- a/src/styles/native/radio.css +++ b/src/styles/native/radio.css @@ -10,7 +10,7 @@ label:has(input[type='radio']), --box-shadow: none; --checked-icon-color: var(--wa-form-control-activated-color); --checked-icon-scale: 0.75; - --toggle-size: 1lh; + --toggle-size: round(1lh, 1px); color: var(--wa-form-control-value-color); display: inline-flex; @@ -34,10 +34,8 @@ input[type='radio'] { background-color: var(--checked-icon-color); border-radius: 50%; content: ''; - position: absolute; - width: calc(var(--toggle-size) - var(--border-width)); - height: calc(var(--toggle-size) - var(--border-width)); - scale: var(--checked-icon-scale); + width: round(calc(100% * var(--checked-icon-scale)), 1px); + aspect-ratio: 1; } }