Transparent sort icons

Transparent sort icons

sskopniksskopnik Posts: 3Questions: 0Answers: 0
edited January 2010 in Bug reports
P l e a s e ! Can you make the background of default arrow icons for sorting transparent?

Think, al lot of people are using none white backgrounds. Every time I install a new DataTables release I have to replace them with my customized version.

Of course I can send you my versions, but I think you can change your version in 2 minutes

Thanks

Replies

  • myqalanmyqalan Posts: 13Questions: 0Answers: 0
    I have had to do this too. I modified the originals to be PNG-8 format with index transparency (this can be done easily in editing tools like Fireworks), since my employer still supports IE6.
  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    Hi,

    Yup - sounds like a reasonable request. I hadn't really intended the default images (or the css for that matter) to be much more than a basic demo when I originally made them, but it does sounds like a good idea to bring this up to a decent standard...

    Regards,
    Allan
  • jlundelljlundell Posts: 8Questions: 0Answers: 0
    I ran into a related problem. My TH background color by default is light blue (inherited from Blueprint CSS, I think). The sort icons override that with white, which is actually fine by me. But I have column 0 set to no-sort, and it doesn't get a class or a background.

    As a workaround, I defined a 'nosort' style with a white background, so it matches the sort icon backgrounds.

    I'd like to see DT assign a nosort class when sorting is disabled, to give us a hook for that kind of thing.
  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    Hi jlundell,

    There is indeed a method to do this, although there is no default class in DataTables for this. Take a peak at: http://datatables.net/styling/custom_classes#sSortableNone - you'll be able to see that you can assign a class manually to this kind of cell. However, I agree that it would be perhaps more useful to have a default here. I'll add this into the next release.

    One other thing to note - in 1.6.x the sorting icons are now png8, and have transparent backgrounds. Although obviously you can use the older gif ones if needed.

    Regards,
    Allan
This discussion has been closed.