Template:Sticky header/testcases
![]() | This is the template test cases page for the sandbox of Template:Sticky header. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
__EXPECTUNUSEDTEMPLATE__
![]() | This template uses TemplateStyles: |
Uses {{sticky header/sandbox}}. Note that it's not possible to compare the live and sandbox versions of styles.css on the same page since they would compete with each other.
Test sticky-header (no caption)
Sticky first row.
Wikitable:
Header | Header 2 | Header 3 | Header 4 |
---|---|---|---|
3 | data | data | b |
1 | data | data | c |
2 | data | data | a |
Wikitable wikitext: <syntaxhighlight lang="wikitext" highlight="1-2">
Header | Header 2 | Header 3 | Header 4
⫶ |
---|
</syntaxhighlight>
Plain table:
Header | Header 2 | Header 3 | Header 4 |
---|---|---|---|
3 | data | data | b |
1 | data | data | c |
2 | data | data | a |
Plain table wikitext: <syntaxhighlight lang="wikitext" highlight="1-2">
Header | Header 2 | Header 3 | Header 4
⫶ |
---|
</syntaxhighlight>
Test sticky-header (caption)
Sticky first row.
Wikitable:
Header | Header 2 | Header 3 | Header 4 |
---|---|---|---|
3 | data | data | b |
1 | data | data | c |
2 | data | data | a |
Wikitable wikitext: <syntaxhighlight lang="wikitext" highlight="1-2">
Header | Header 2 | Header 3 | Header 4
⫶ |
---|
</syntaxhighlight>
Plain table:
Header | Header 2 | Header 3 | Header 4 |
---|---|---|---|
3 | data | data | b |
1 | data | data | c |
2 | data | data | a |
Plain table wikitext: <syntaxhighlight lang="wikitext" highlight="1-2">
Header | Header 2 | Header 3 | Header 4
⫶ |
---|
</syntaxhighlight>
Test sticky-header (sortable)
Sticky first row.
Wikitable:
Header | Header 2 | Header 3 | Header 4 |
---|---|---|---|
top | top | top | top |
3 | data | data | b |
1 | data | data | c |
2 | data | data | a |
bottom | bottom | bottom | bottom |
Wikitable wikitext: <syntaxhighlight lang="wikitext" highlight="1-2">
Header | Header 2 | Header 3 | Header 4 |
---|---|---|---|
top | top | top | top
⫶ |
bottom | bottom | bottom | bottom |
</syntaxhighlight>
Plain table:
Header | Header 2 | Header 3 | Header 4 |
---|---|---|---|
top | top | top | top |
3 | data | data | b |
1 | data | data | c |
2 | data | data | a |
bottom | bottom | bottom | bottom |
Plain table wikitext: <syntaxhighlight lang="wikitext" highlight="1-2">
Header | Header 2 | Header 3 | Header 4 |
---|---|---|---|
top | top | top | top
⫶ |
bottom | bottom | bottom | bottom |
</syntaxhighlight>
Test sticky-header-multi
Sticky <thead>
element.
Issues:
- Nothing sticky if JavaScript disabled, which is used by sortable, currently the only way to move headers to the
<thead>
element. - Sticky
sorttop
rows, which sortable moves to the<thead>
element after sorting.
Wikitable:
Header | Header group | ||||||
---|---|---|---|---|---|---|---|
Header 2 | Header 3 | Header 4 | |||||
top | top | top | top | ||||
3 | data | data | b | ||||
1 | data | data | c | ||||
2 | data | data | a | ||||
bottom | bottom | bottom | bottom |
Wikitable wikitext: <syntaxhighlight lang="wikitext" highlight="1-2">
Header | Header group | ||||||
---|---|---|---|---|---|---|---|
Header 2 | Header 3 | Header 4 | |||||
top | top | top | top
⫶ | ||||
bottom | bottom | bottom | bottom |
</syntaxhighlight>
Plain table:
Header | Header group | ||||||
---|---|---|---|---|---|---|---|
Header 2 | Header 3 | Header 4 | |||||
top | top | top | top | ||||
3 | data | data | b | ||||
1 | data | data | c | ||||
2 | data | data | a | ||||
bottom | bottom | bottom | bottom |
Plain table wikitext: <syntaxhighlight lang="wikitext" highlight="1-2">
Header | Header group | ||||||
---|---|---|---|---|---|---|---|
Header 2 | Header 3 | Header 4 | |||||
top | top | top | top
⫶ | ||||
bottom | bottom | bottom | bottom |
</syntaxhighlight>
Test template static row numbers (sticky-header, no caption)
Uses {{static row numbers}} with adjusted wikitable borders.
No label:
Header |
---|
rank 1 |
rank 2 |
norank 1 |
norank 2 |
rank 3 |
rank 4 |
Label:
Header |
---|
rank 1 |
rank 2 |
norank 1 |
norank 2 |
rank 3 |
rank 4 |
Test template static row numbers (sticky-header, caption)
Uses {{static row numbers}} with adjusted wikitable borders.
No label:
Header |
---|
rank 1 |
rank 2 |
norank 1 |
norank 2 |
rank 3 |
rank 4 |
Label:
Header |
---|
rank 1 |
rank 2 |
norank 1 |
norank 2 |
rank 3 |
rank 4 |
Test template static row numbers (sticky-header, sortable)
Uses {{static row numbers}} with adjusted wikitable borders.
No label:
Header |
---|
top |
top |
rank 1 |
rank 2 |
norank 1 |
norank 2 |
rank 3 |
rank 4 |
bottom |
bottom |
Label:
Header |
---|
top |
top |
rank 1 |
rank 2 |
norank 1 |
norank 2 |
rank 3 |
rank 4 |
bottom |
bottom |
Test template static row numbers (sticky-header-multi)
Uses {{static row numbers}} with adjusted wikitable borders.
No label:
Header group | |
---|---|
Header | Header |
top | top |
top | top |
rank 1 | data |
rank 2 | data |
norank 1 | data |
norank 2 | data |
rank 3 | data |
rank 4 | data |
bottom | bottom |
bottom | bottom |
Label:
Header group | |
---|---|
Header | Header |
top | top |
top | top |
rank 1 | data |
rank 2 | data |
norank 1 | data |
norank 2 | data |
rank 3 | data |
rank 4 | data |
bottom | bottom |
bottom | bottom |
Padding
Padding for testing purposes.