From 3e49154ea6be7f411c524a11559a8d426efb8e1e Mon Sep 17 00:00:00 2001 From: Josh Wooding <12938082+joshwooding@users.noreply.github.com> Date: Wed, 11 Sep 2024 13:50:56 +0100 Subject: [PATCH] Update Checkbox and Radio Button styling to be more robust (#4078) --- .changeset/mean-pianos-brake.md | 5 +++++ packages/core/src/checkbox/CheckboxIcon.css | 2 ++ packages/core/src/radio-button/RadioButtonIcon.css | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 .changeset/mean-pianos-brake.md diff --git a/.changeset/mean-pianos-brake.md b/.changeset/mean-pianos-brake.md new file mode 100644 index 00000000000..986deadb73b --- /dev/null +++ b/.changeset/mean-pianos-brake.md @@ -0,0 +1,5 @@ +--- +"@salt-ds/core": patch +--- + +Updated Checkbox and Radio Button to have more robust styling. diff --git a/packages/core/src/checkbox/CheckboxIcon.css b/packages/core/src/checkbox/CheckboxIcon.css index bbb879d65db..e91edc56bb3 100644 --- a/packages/core/src/checkbox/CheckboxIcon.css +++ b/packages/core/src/checkbox/CheckboxIcon.css @@ -11,6 +11,8 @@ position: relative; --saltIcon-size: 100%; display: flex; + /* Using overflow:hidden here causes a thin white line */ + clip-path: border-box; box-sizing: border-box; } diff --git a/packages/core/src/radio-button/RadioButtonIcon.css b/packages/core/src/radio-button/RadioButtonIcon.css index 93d135629f6..ba737ec35c8 100644 --- a/packages/core/src/radio-button/RadioButtonIcon.css +++ b/packages/core/src/radio-button/RadioButtonIcon.css @@ -12,6 +12,9 @@ background: var(--salt-container-primary-background); --saltIcon-size: 100%; display: flex; + /* Using overflow:hidden here causes a thin white line */ + clip-path: border-box; + box-sizing: border-box; } .saltRadioButton:hover .saltRadioButtonIcon {