tofsjonas / sortable

Vanilla JavaScript table sort
The Unlicense
423 stars 49 forks source link

Enhancement request: positioning of sort indicator #29

Closed axlekb closed 1 year ago

axlekb commented 1 year ago

The sort indicator is positioned using ::after. Any interest in adding a class to allow it to be optionally positioned ::before as well?

The use case would be for right aligned columns. Currently the ::after adds extra space which results in the header column not lining up with the body columns.

Example: Right alignment issue

image

Example: positioning indicator using ::before

image
tofsjonas commented 1 year ago

Er, I added the css more as an example. It was never meant to be used "for real".

I guess it would be the same as with no-sort, either add class + css or plain css

It looks like you've already done this; if you would like to share your code I can put it in the readme 😊