nice-select2 icon indicating copy to clipboard operation
nice-select2 copied to clipboard

height:0 and width:0 don't work on border

Open Petercopter opened this issue 1 year ago • 1 comments

If there is a border on the select input then

height: 0;
width: 0;

don't work correctly to remove the input from the dom. If the border is 1px, you get a 2x2 square. Even the absolutely plain select input with no styling does this, I had to add border:0 to get it to work. image

EDIT: Well this is interesting. If you add border: 0, the input validation no longer shows...

Petercopter avatar May 31 '24 19:05 Petercopter

I'm experiencing the original issue. In my case, I don't have a need for validation.

If setting border: 0 makes the element no longer focusable by validation, is that because it is behaving the same as a hidden element? What if all properties of the element were set to 0, except for height: 1px then offset that by margin-bottom: -1px?

justin-oh avatar Jul 08 '24 22:07 justin-oh

I cannot reproduce.

Please supply me with your html if you still have this issue

Tsjippy avatar Jul 24 '25 10:07 Tsjippy