tom-select
tom-select copied to clipboard
Correct clear button plugin's Bootstrap5 position
Before
The default CSS "right" attribute for a single clear button is a calc(2.75rem - 5px) which makes the clear button stay too far from the right border.
After
Using a .75em right position mimic other Bootstrap 5 alignments values.
That css should probably be in the plugin's css file. Would you like to update your pull request or should I just do it?
I was under the impression that this position is specific to the CSS designed for Boostrap 5, so I thought it might conflict with non-Bootstrap 5 designs.
I just checked the clear button plugin demos and noticied with the default CSS, the position I designed is suitable for a select multiple :
But not for a select single where there is chevron down icon at the end :
I think that if it can be made compatible with all designs, moving it to the plugin's css file would be better.
Do you have a link to an example that displays the problem?
Examples: https://jsfiddle.net/0pfwx6s1/ vs https://jsfiddle.net/0pfwx6s1/1/
Thank you very much @oyejorge !
Sorry I was not more reactive as I was unavailable for a few days.