Skip to content

Using box-shadow in built-in appearances #9458

Answered by waterplea
loxy asked this question in Q&A
Discussion options

You must be logged in to vote

Border cannot have subpixel transition and it being a part of the box model is a downside, rather than upside, since you would have to subtract it from padding. Say buttons have 1rem padding. If in outline appearance we used border then it would affect it and we would need to use calc(1rem - 1px). Visual appearance should not leak into layout since it is applied to all kind of elements, from inputs to buttons, to badges and chips. Not sure what you mean by border-radius compatibility. Box-shadow is exactly great for border-radius since it properly expands inwards and outwards. For complex border styles like dashed or dotted you can use outline, but be aware that damned Safari only started…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@loxy
Comment options

Answer selected by loxy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants