Going backwards to go forwards (aka dealing with an inheritance)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Going backwards to go forwards (aka dealing with an inheritance)
« on February 25th, 2012, 03:09 PM »
OK, so I was working on my style based on SMF's Core theme again, and I realised that the board index actually needs some work to it in the markup.

Those of you who remember the Core theme will probably remember that in Core, each category was a separate block visually - well, turns out it's also a separate block in the markup, i.e. a separate table. But in Curve, it's one massive table for the entire board index.

Specifically, it's a single massive table that uses 3 tbodys per category, one for the heading, one for the boards and one as a divider between boards.

I'm suggesting the structure be altered thus:
* a new div around the board index (encapsulating everything that is currently #board_list)
* a new table for each category
* said table should use a thead for the category name and tbody to contain each of the rows, which is both easier to style and more semantically correct
* the divider between categories should be handled a div in case people want to style it or otherwise target it (much as currently it's a tbody.divider, it should become a div.table_divider or similarly named class)

This combination of things should allow us to retain anything that can be presently done against Curve markup whilst also allowing for the sorts of things I want to do in my Core mashup (like putting borders around entire categories to visually separate them from everything else)

Thoughts?
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,079

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Going backwards to go forwards (aka dealing with an inheritance)
« Reply #2, on February 25th, 2012, 03:40 PM »
No reason to reproduce exactly other than because I want to.

But right now your choices are actually limited. You cannot put any kind of visual border around a single category to keep it visually broken away from any other category - without changing the code.

Nao

  • Dadman with a boy
  • Posts: 16,079

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Going backwards to go forwards (aka dealing with an inheritance)
« Reply #4, on February 25th, 2012, 06:20 PM »
It will be mostly the boards template with a little tweaking of CSS to re-align things with the changed structure.

The advantage of having thead and tbody is that you can semantically group rows together - and there's already tbodys present so it's not like I'm dumping new tags everywhere, just tweaking what's there.
Re: Going backwards to go forwards (aka dealing with an inheritance)
« Reply #5, on March 13th, 2012, 01:17 AM »
OK, so what I did in r1455 was mostly this, I just didn't specifically implement the divider as suggested (though I can if needed), instead I did everything else but dropped the divider and implemented that part as a margin-bottom attached to the per-category tables.

It makes sense when you look at the code :P