Jump to content

User:Timeshifter/Sandbox234

From Wikipedia, the free encyclopedia

Classes and sub-templates of Template:Static row numbers

Classes created by Template:Static row numbers
Wikitext Place after Short description
class="static-row-numbers" {| Adds row numbers.
class="static-row-header" |- No row number. Some borders removed.
class="static-row-numbers-norank" |- No row number. Borders remain.
class="static-row-header-text" {| Adds "No." to number column header.
class="static-row-header-hash" {| Adds "#" to number column header.

Sub-template usage. Place after |-
Sub-templates Shortcut Wikitext
{{Static row numbers total}} {{srn total}} class="static-row-header" style="font-weight:bold;"
{{Static row numbers header}} {{srn header}} class="static-row-header" style="text-align:center;vertical-align:bottom;"

In tables with class=wikitable the above 2 templates should not be used on rows where all the cells are headers. All-header rows do not have row numbers, and are already center-aligned and bold. People are often mistakenly adding {{Static row numbers header}} to header rows. It does nothing there. Neither does {{Static row numbers total}}



The following 2 templates have various problems listed on their doc pages.

Sub-template usage. Place after |-
Sub-template Shortcut Wikitext
{{Static row numbers arrows}} {{srn arrows}} See template doc for variable output
Sub-template usage. Place after {|
Sub-template Shortcut Wikitext
{{Static row numbers table}} {{srn table}} class="wikitable sortable static-row-numbers plainrowheaders srn-white-background" border=1 style="text-align:right;"


The following sub-template also has a problem. See this version of List of countries by imports. United States should not have a row number. But it does because of this combination:

|- {{Static row numbers no rank}}{{sort row|3}}
Sub-template usage. Place after |-
Sub-templates Wikitext
{{Static row numbers no rank}} class="static-row-numbers-norank"

The template is no longer being used in article space.

class=static-row-numbers-norank is very useful. It is NOT the same as class=static-row-header

class=static-row-numbers-norank keeps all the borders in the row number column. class=static-row-header does not. To see the difference see this diff for List of countries by population (United Nations). I checked in Safari on my iphone SE 2020, and it is true there too.