Template:Table/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (→‎Parameters: {{{sticky}}})
Line 6: Line 6:


== Parameters ==
== Parameters ==
* {{Param|id}} - Element ID for links.
{| class="standard-table" style="width:100%"
* {{Param|class}} - Custom HTML class.
|- style="position:sticky; z-index:10; top:0"
* {{Param|style}} - Custom CSS (prepared styles are also planned).
! Parameter
 
! Description
* {{Param|width}} - Element width.
|-
* {{Param|caption}} - Table caption (Not available for {{Code|<nowiki>{{Table|tr}}</nowiki>}}, {{Code|<nowiki>{{Table|th}}</nowiki>}} and {{Code|<nowiki>{{Table|td}}</nowiki>}}.).
| {{Param|id}}
* {{Param|caption indent}} - {{Todo}}
| Element ID for links.
* {{Param|caption indent:top}} - {{Todo}}
|-
* {{Param|caption indent:right}} - {{Todo}}
| {{Param|class}}
* {{Param|caption indent:bottom}} - {{Todo}}
| Custom HTML class.
* {{Param|caption indent:left}} - {{Todo}}
|-
 
| {{Param|style}}
* {{Param|tr}} - {{Code|&#60;tr>&#60;/tr>}}
| Custom CSS (prepared styles are also planned).
* {{Param|th}} - {{Code|&#60;th>&#60;/th>}}
|-
* {{Param|td}} - {{Code|&#60;td>&#60;/td>}}
| {{Param|width}}
 
| Element width.
* {{Param|colspan}} - {{Todo}}
|-
* {{Param|cellpadding}} - {{Todo}}
| {{Param|caption}}
* {{Param|bgcolor}} - Background color.
| Table caption (Not available for {{Code|<nowiki>{{Table|tr}}</nowiki>}}, {{Code|<nowiki>{{Table|th}}</nowiki>}} and {{Code|<nowiki>{{Table|td}}</nowiki>}}.).
* {{Param|radius}} - The radius of the cell border.
|-
* {{Param|font-size}} - Font size.
| {{Param|caption indent}}
* {{Param|color}} - Color of the text.
| {{Todo}}
* {{Param|align}} - Alignment of a table or text.
|-
* {{Param|sticky}} - Makes {{Code|<nowiki>{{Table|tr}}</nowiki>}} stick to the top of the screen.
| {{Param|caption indent:top}}
| {{Todo}}
|-
| {{Param|caption indent:right}}
| {{Todo}}
|-
| {{Param|caption indent:bottom}}
| {{Todo}}
|-
| {{Param|caption indent:left}}
| {{Todo}}
|-
| {{Param|tr}}
| {{Code|&#60;tr>&#60;/tr>}}
|-
| {{Param|th}}
| {{Code|&#60;th>&#60;/th>}}
|-
| {{Param|td}}
| {{Code|&#60;td>&#60;/td>}}
|-
| {{Param|colspan}}
| {{Todo}}
|-
| {{Param|cellpadding}}
| {{Todo}}
|-
| {{Param|bgcolor}}
| Background color.
|-
| {{Param|radius}}
| The radius of the cell border.
|-
| {{Param|font-size}}
| Font size.
|-
| {{Param|color}}
| Color of the text.
|-
| {{Param|align}}
| Alignment of a table or text.
|-
| {{Param|sticky}}
| Makes {{Code|<nowiki>{{Table|tr}}</nowiki>}} stick to the top of the screen.
|}


== Example ==
== Example ==

Revision as of 05:53, 12 June 2023

Edit-copy.png
This is a documentation subpage for Template:Table.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Adds a table, but actually adds a table.

Template:ModernNote

Todo: Make the documentation better.

Parameters

Parameter Description
{{{id}}} Element ID for links.
{{{class}}} Custom HTML class.
{{{style}}} Custom CSS (prepared styles are also planned).
{{{width}}} Element width.
{{{caption}}} Table caption (Not available for {{Table|tr}}, {{Table|th}} and {{Table|td}}.).
{{{caption indent}}} [Todo]
{{{caption indent:top}}} [Todo]
{{{caption indent:right}}} [Todo]
{{{caption indent:bottom}}} [Todo]
{{{caption indent:left}}} [Todo]
{{{tr}}} <tr></tr>
{{{th}}} <th></th>
{{{td}}} <td></td>
{{{colspan}}} [Todo]
{{{cellpadding}}} [Todo]
{{{bgcolor}}} Background color.
{{{radius}}} The radius of the cell border.
{{{font-size}}} Font size.
{{{color}}} Color of the text.
{{{align}}} Alignment of a table or text.
{{{sticky}}} Makes {{Table|tr}} stick to the top of the screen.

Example

{{Table | align = center | caption = <span style="user-select:none"> [[File:ValveEmployee.png|link = Valve]] </span> | caption indent:bottom = 1em | {{Table|tr | {{Table|th|radius=3px 0 0 0| Header 1 }} {{Table|th| Header 2 }} {{Table|th|radius=0 3px 0 0| Header 3 }} }} {{Table|tr | {{Table|td| Cell 1 }} {{Table|td| Cell 2 }} {{Table|td|rowspan=2| Cell 3 }} }} {{Table|tr | {{Table|td|colspan=2|bgcolor=#303030| Cell 4 }} }} {{Table|tr | {{Table|td|radius=0 0 0 3px| Cell 6 }} {{Table|td|colspan=2|bgcolor=#303030|radius=0 0 3px 0| Cell 7 }} }} }}
tr tr tr tr