slim-select
slim-select copied to clipboard
moveContentAbove doesn't respect ss-content margin
When the ss-content box is put above the select, the margin values of .ss-content
are not respected in the calculation.
This line calculates the content box height via offsetHeight
, which doesn't account for the margins set in CSS:
https://github.com/brianvoe/slim-select/blob/a091b626806430b7c3f6dfb63f5a43909c8c9cc6/src/slim-select/index.ts#L336
In my case, .ss-content
has vertical margins set to 4px, so i can have some breathing room between the select and the content box. It works fine when the content box is 'below', since there's no position calculation needed.
Maybe that spacing could be a configurable option which can be added to the line that sets the negative top margin for the content box: https://github.com/brianvoe/slim-select/blob/a091b626806430b7c3f6dfb63f5a43909c8c9cc6/src/slim-select/index.ts#L338
Can you post screen shots of what you are seeing please
Sure!
Content box above (without space):
Content box below (with correct space):
New version of slim select has been released. If this is still an issue let me know and ill try to take care of it.