I use box-shadow
to draw borders around selected HTML elements (I set class on them when the user selects them by clicking), because it doesn't interfere with the layout (adds no space around the element and doesn't override the element border). Unfortunately box-shadow
doesn't work on some elements, like input
s without setting their -webkit-appearance
to none
.
Changing the appearance is not an option.
Can I somehow draw a frame around the input without affecting it's style?
outline
does not work, because it doesn't show border radiuses correctlyborder
does not work, because it adds space + overrides any element border. Changing thebox-sizing
toborder-box
is also not an option.