utily / smoothly

Web component library written with Stencil.
https://payfunc.com/open-source/smoothly
MIT License
1 stars 5 forks source link

Improve select options div position #795

Closed Magnus93 closed 1 month ago

Magnus93 commented 1 month ago

The Issue

The options div is relative to the padding area (inside the border) of smoothly-input-select, so the position is off. Here I've put big borders to demonstrate this. Screenshot from 2024-07-26 09-20-49

Before Example

To compensate for this I use the left and right inset instead of translateX which just moves the div. image

After Example

image

How ever this is still not perfect since at some scales the options div might be off by a pixel. The really fix this we should put the border on an element inside Host (smoothly-input-select) instead of on the host. This way both divs are be placed relative to the same parent. But this was the quickest an easiest fix for now.