open-ui icon indicating copy to clipboard operation
open-ui copied to clipboard

border-radius for outline

Open o-t-w opened this issue 2 years ago • 0 comments

Now that we have accent-color, I would like to use native HTML inputs for most things. One of the reasons I might still build a custom control rather than using the default HTML one is having a border-radius for outline.

People often use a box-shadow to deal with the fact that not all browsers (e.g. Safari) will honor border-radius for outline. This approach does not work for a native HTML radio element - you can set the border-radius to 100% and it will still be square. Using an actual outline rather than box-shadow hack will be a rounded rectangle in Edge & Chrome, not a circle. CodePen example See also example, this Stack Overflow question.

o-t-w avatar Mar 29 '22 11:03 o-t-w