This template is rated as pre-alpha. It is unfinished, and may or may not be in active development. It should not be used from article namespace pages. Templates remain pre-alpha until the original editor (or someone who takes one over if it is abandoned for some time) is satisfied with the basic structure. |
This template uses TemplateStyles: |
This template provides the styles for plain row headers, specifically in wikitable CSS class tables. It makes row-scoped table headers normal font weight and text-aligned left.
Blockers for use currently
- There are currently 125k pages that use the plainrowheaders class, of which 118k are in main space. It is prohibitive to do this by hand. A bot request will be started.
- WP:TemplateStyles may at some arbitrary point in the future apply only to the template they are transcluded from. This case is not currently "supported". See phab:T176272.
- The wider community was notified and nothing of interest was discussed. In other discussion from the content transform team members, the HTML emitted does not make this an issue.
- Don't create the natural redirect {{plainrowheaders}} (yet, maybe ever). This will assist tracking of addition of this template to pages as well as needed addition to pages. Tracking search.
Usage
Add the text class="wikitable plain-row-headers"
to a table. Above that table, add this template. Add this template above every such table on a single page.
While stuff may work today with only a single use, there are a few reasons why you should add it multiple times: 1) The CSS is 'deduplicated', meaning it only appears once on the page regardless; 2) It is easier for a newbie to learn and associate what's going on with these styles if the template is near to where the table using them is placed; and 3) it will be less confusing in section edit when the styles don't show up to explain that the template is located elsewhere on the page and so it should be added to the table where it is used currently.
Example
Wikitext | Produces | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
{| class="wikitable"
|+ Example normal wikitable
|-
! scope="col" | Col header
! scope="col" | Col header
! scope="col" | Col header
|-
! scope="row" | Row header
| A
| B
|-
! scope="row" | Row header long
| C
| D
|}
|
| |||||||||
{{plain row headers}}
{| class="wikitable plain-row-headers"
|+ Wikitable with plain row headers
|-
! scope="col" | Col header
! scope="col" | Col header
! scope="col" | Col header
|-
! scope="row" | Row header
| A
| B
|-
! scope="row" | Row header long
| C
| D
|}
|
|