Topic on Extension talk:TemplateStyles/Q&A

Billinghurst (talkcontribs)

Will there be ability to style table columns in this methodology? The Wikisources have been wishing for that capability as we need to reproduce complex tables in published works. At the moment we have to style by cells, and doing that for very ''n''th cell in a long table is messy.

Billinghurst (talkcontribs)

For an example of some of the formatting that we have done to get around column formatting

S:en:Page:National Life and Character.djvu/358

and the master template that we have built to assist to get uniformity and some simplication (and a level of tidiness)

S:en:Template:Table style

Think how that can be when we have 15 columns wide, and 30 rows deep. It becomes very ugly, so getting this implemented will be of great assistance. We can probably offer tables for testing if required, we have plenty.

Tgr (WMF) (talkcontribs)

That's a CSS question that's not really related to the questions mentioned here. In CSS3, you can use :nth-child which works well as long as your table structure is regular (ie. you don't use colspan, or use it the same way in every row). CSS4 (still in draft phase) has proper column support, but is far from being supported by any browser, and the TemplateStyles CSS sanitizer won't support it either. In short, depends on how complex that table is.

Billinghurst (talkcontribs)

@Tgr (WMF) I understand that "nth-child" can be used in common.css, it was my understanding that it was unable to be used in templates. So that was why I asking whether was now going to be undertaken this sort of implementation of templatestyles. If you are indicating that nth-child can be used in templates now, then I have a whole community who didn't realise** and we have got some reading and clean-up to do.

** [This could be the case as we are enthusiastic transcribers, though not much of the generation of style/class/objects!]

Tgr (WMF) (talkcontribs)

Yeah, pretty much everything form CSS3 that we don't have an explicit reason to disallow will be usable in templates.

Billinghurst (talkcontribs)

Fantastic, that will allow us to close out phabricator tickets that ask about this functionality.

Anomie (talkcontribs)
197.218.80.201 (talkcontribs)
Reply to "Styling columns"