View Single Post

Thread: Upcoming TABLE Code Changes

  1. - Top - End - #241
    Halfling in the Playground
     
    Flumph

    Join Date
    Oct 2004
    Location
    In the vicinity of Betelgeuse.

    Default Re: Upcoming TABLE Code Changes

    Quote Originally Posted by Seerow View Post
    I wonder, is there some way to get the vertical lines, but not horizontal? With the striped colors, the horizontal lines aren't as necessary, but without vertical lines the tables end up looking kind of cluttered.
    Not exactly, to my knowledge, but here is the closest I’ve been able to achieve:

    Spoiler: Vertical-lined table (-ish)
    Show

    Animal Vegetable Mineral
    Elephant Broccoli Feldspar
    Dolphin Chestnut Corundum
    Cheetah Okra Quartz
    Mako Avocado Kimberlite
    Macaw Snap Peas Basalt
    Monarch Daffodil Granite


    I agree it would be great if there were a vertical_grid table class (and a horizontal_grid class too for that matter), but the tables as they currently exist are certainly quite useable and flexible.

    Quote Originally Posted by Seerow View Post
    After preview: looks like Colspan works beautifully with it. It sorts by the first column that it affects rather than causing any funky results like switching cells around to put them in order. Perfect.
    That is not quite how colspan interacts with sortable headers. The nth header cell sorts by the nth column, regardless of colspan. So in the following table, the last header cell (being the third of them) sorts by the middle column (which is the third column), even though the first two header cells each have colspan: 2.


    Spoiler: Vertical-lined table (-ish) with colspan
    Show

    Animal Vegetable Mineral
    Elephant Broccoli Feldspar
    Dolphin Chestnut Corundum
    Cheetah Okra Quartz
    Mako Avocado Kimberlite
    Macaw Snap Peas Basalt
    Monarch Daffodil Granite


    Also note that the second header cell there (as well as either of the blank interstitial pseudoheader cells in the first table) have their “sort” arrows act by reversing the current order of the rows, regardless of whether or not they are currently sorted by any other criterion.

    Edit: new discovery, almost certainly of no good use (probably not of neutral use either):

    Spoiler: Vertical-lined table (-ish) that refuses to sort
    Show

    Animal Vegetable Mineral
    Elephant Broccoli Feldspar
    Dolphin Chestnut Corundum
    Cheetah Okra Quartz
    Mako Avocado Kimberlite
    Macaw Snap Peas Basalt
    Monarch Daffodil Granite


    Edit 2: If you don’t mind losing the ability to sort rows, you can also make a table of one-column tables:

    Spoiler: Vertical-lined table (no sorting possible)
    Show

    Animal
    Elephant
    Dolphin
    Cheetah
    Mako
    Macaw
    Monarch
    Vegetable
    Broccoli
    Chestnut
    Okra
    Avocado
    Snap Peas
    Daffodil
    Mineral
    Feldspar
    Corundum
    Quartz
    Kimberlite
    Basalt
    Granite


    Also, I just found a bug of sorts. If you put a table inside a table and make the inner table wider than the column it’s in, it almost works, except the sort arrows float on top:

    Spoiler: Vertical-lined table (-ish) with minitable bug
    Show

    Animal Vegetable Mineral
    Elephant Broccoli Feldspar
    Dolphin Chestnut Corundum
    Cheetah Okra Quartz
    Mako Avocado Kimberlite
    Macaw Snap Peas Basalt
    Monarch Daffodil
    Animal Vegetable Mineral
    Elephant Broccoli Feldspar
    Dolphin Chestnut Corundum
    Cheetah Okra Quartz
    Mako Avocado Kimberlite
    Macaw Snap Peas Basalt
    Monarch Daffodil Granite
    Last edited by Qaanol; 2014-04-10 at 09:29 PM.
    Quote Originally Posted by NihhusHuotAliro’s cousin View Post
    It's a secret, like suspenders.