Currently working on enhancing a radio button design by incorporating an inset box-shadow
.
If you're interested, check out this CodePen showcasing my progress so far.
The main challenge I'm facing is getting the background of the .radio-button
<div />
to dictate the color of the box-shadow
. In my initial approach, the color was specified as #fff
, which proved effective on a white backdrop but not on a gray one.
- Assigning it as
currentColor
results in the box shadow picking up theborder-color
value (#333
); - Opting for
inherit
seems to deactivate the box-shadow, particularly noticeable in Chrome. It makes some sense as I supposeinherit
might not apply to certain property components here. - Omitting any specific color selection defaults to using the
color
value, typically resulting in black.
Any suggestions on how to achieve this desired effect without resorting to JavaScript?