Skip to content

Commit

Permalink
Hover display for a selected radio (#583)
Browse files Browse the repository at this point in the history
* fix(radio): hover display for a selected radio

* fix(radio): modification following PR comment

* fix(radio): add background on focus state
  • Loading branch information
Franck Gaudin authored Dec 4, 2023
1 parent a88ff19 commit 812546b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/silver-ghosts-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@igloo-ui/radio": patch
---

fix the problem of displaying the hover of a selected radio
12 changes: 7 additions & 5 deletions packages/Radio/src/radio.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
--ids-radio-background-disabled: var(--hop-neutral-surface-disabled);
--ids-radio-background-disabled-checked: var(--hop-neutral-surface-disabled);
--ids-radio-background-checked: var(--hop-neutral-surface-active);
--ids-radio-check-background-checked-hover: var(--hop-neutral-icon-hover)
}

%radio {
Expand Down Expand Up @@ -117,18 +116,21 @@
&:focus {
outline: none;
box-shadow: var(--focus);
background-color: var(--ids-radio-background-hover, var(--ids-radio-background));
}

&:hover {
border-color: var(--ids-radio-border-hover);
background-color: var(--ids-radio-background-hover, var(--ids-radio-background))
background-color: var(--ids-radio-background-hover, var(--ids-radio-background));
}

&:checked:hover {
border-color: var(--ids-radio-border-checked-hover, var(--ids-radio-border-hover)) ;
&:checked:hover,
&:checked:focus {
border-color: var(--ids-radio-border-checked-hover, var(--ids-radio-border-hover));
background-color: var(--ids-radio-background-checked, var(--ids-radio-background-checked));

&::after {
background: var(--ids-radio-check-background-checked-hover, var(--ids-radio-background));
background: var(--ids-radio-background);
}
}

Expand Down

0 comments on commit 812546b

Please sign in to comment.