tom-select icon indicating copy to clipboard operation
tom-select copied to clipboard

Correct clear button plugin's Bootstrap5 position

Open czj opened this issue 3 years ago • 4 comments

Before

image

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

image

Using a .75em right position mimic other Bootstrap 5 alignments values.

czj avatar Sep 06 '22 09:09 czj

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?

oyejorge avatar Sep 06 '22 14:09 oyejorge

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 :

image

But not for a select single where there is chevron down icon at the end :

image

I think that if it can be made compatible with all designs, moving it to the plugin's css file would be better.

czj avatar Sep 06 '22 15:09 czj

Do you have a link to an example that displays the problem?

oyejorge avatar Sep 19 '22 23:09 oyejorge

Examples: https://jsfiddle.net/0pfwx6s1/ vs https://jsfiddle.net/0pfwx6s1/1/

oyejorge avatar Sep 22 '22 19:09 oyejorge

Thank you very much @oyejorge !

Sorry I was not more reactive as I was unavailable for a few days.

czj avatar Sep 23 '22 14:09 czj