|
|
(One intermediate revision by the same user not shown) |
Line 1: |
Line 1: |
| <noinclude>{| class="wikitable" | | <noinclude>{| class="wikitable" |
| |- | | |- |
| |</noinclude> style="background: {{{bgcolor|#d3d3d3;}}} color: black; vertical-align: middle; text-align: {{{align|center}}}; font-weight: 800; font-size: 108%;{{{style|}}}" class="table-unknown" {{!}} {{{1| ??? }}}<noinclude> | | |</noinclude> style="background: {{{bgcolor|#d3d3d3;}}}; color: #000; vertical-align: middle; text-align: {{{align|center}}}; font-weight: 800; font-size: 108%;{{{style|}}}" class="table-unknown" {{!}} {{{1| ??? }}}<noinclude> |
| |} | | |} |
| {{Documentation|content=__NOTOC__
| |
| === Purpose ===
| |
| This template creates a table cell with a light grey background and black, larger heavy text which defaults to a triple question mark, as seen above. It is designed to generate a uniform appearance for common cell values in feature and comparison tables with minimal effort, alongside similar templates like:
| |
| <table class="wikitable" style="display: inline-table;"><tr><td class="table-yes" style="background: #90ff90; color: #000; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;"> [[Template:Yes|Yes]] </td></tr></table>and <table class="wikitable" style="display: inline-table;"><tr><td class="table-no" style="background: #ff9090; color: #000; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;"> [[Template:No|No]] </td></tr></table>
| |
|
| |
|
| === Usage ===
| | {{Documentation}}</noinclude> |
| The template will only function properly when used inside of the standard wikicode for tables, following the <code>{{!}}</code> character(s) which indicate the table cell. In practice, it looks like this when editing and then when parsed:
| |
| <poem style="display: inline-block; margin: 0.5em 2em 0.5em 6em; width: 30%; padding:15px 15px 15px 15px; background: cornsilk; border: 1px solid #000;">
| |
| {| class="wikitable"
| |
| |-
| |
| | Template documented?
| |
| | Template categorized?
| |
| |-
| |
| | '''<nowiki>{{Unknown}}</nowiki>'''
| |
| | <nowiki>{{Yes}}</nowiki>
| |
| |}
| |
| </poem><table class="wikitable" style="display: inline-block; margin: 2.5em 0 2.5em 2em;"><tr><td>Template documented?</td><td>Template categorized?</td></tr><tr><td style="background: #d3d3d3; color: black; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;" class="table-unknown"> ??? </td><td style="background: #90ff90; color: black; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;" class="table-yes"> Yes </td></tr></table>
| |
| | |
| ==== Custom cell text ====
| |
| The question marks can be replaced with any text desired by assigning it to the value of the <code><nowiki>|1=</nowiki></code> parameter or passing it as the only unnamed parameter. For example, either '''<kbd><nowiki>{{Unknown|TBD}}</nowiki></kbd>''' or '''<kbd><nowiki>{{Unknown|1=TBD}}</nowiki></kbd>''', as both produce the following table cell when transcluded and parsed:
| |
| | |
| <table class="wikitable" style="display: inline-table;"><tr><td style="background: {{{bgcolor|#d3d3d3;}}} color: black; vertical-align: middle; text-align: {{{align|center}}}; font-weight: 800; font-size: 108%;{{{style|}}}" class="table-unknown"> TBD </td></tr></table>
| |
| | |
| ==== Available named parameters ====
| |
| It offers the following named parameters:
| |
| | |
| :<code><nowiki>|align=</nowiki></code> (values of <kbd>left</kbd> or <kbd>right</kbd> align the cell contents to that horizontal edge, overriding the default center alignment)
| |
| :<code><nowiki>|bgcolor=</nowiki></code> (changes the background color and must be terminated with a semicolon — values may be named CSS colors like <kbd>moccasin;</kbd>, long or short RGB hexadecimals like <kbd>#ccc;</kbd> or a keyword like <kbd>transparent</kbd> to disable the background)
| |
| :<code><nowiki>|style=</nowiki></code> (for any other CSS style elements desired beyond the standard formatting)
| |
| | |
| === See also ===
| |
| * {{Tl|Yes}}
| |
| * {{Tl|No}}
| |
| * {{Tl|Beta}}
| |
| * [[:Category:Formatting templates|Category: Formatting templates]]
| |
| }}
| |
| [[Category:Formatting templates]]</noinclude>
| |
[edit] Template documentation
This template creates a table cell with a light grey background and black, larger heavy text which defaults to a triple question mark, as seen above. It is designed to generate a uniform appearance for common cell values in feature and comparison tables with minimal effort, alongside similar templates like these (each a link to its own template page):
Usage
The template will only function properly when used inside of the standard wikicode for tables, following the pipe character(s) which indicate the start of a new table cell. In practice, it looks like this when editing and then when parsed:
{| class="wikitable"
! scope="col" | Template documented?
! scope="col" | Template categorized?
|-
| {{Unknown}}
| {{Yes}}
|}
⇒
Template documented?
|
Template categorized?
|
???
|
Yes
|
Custom text
The triple question marks that are the cell's default contents can be replaced with any text desired, simply by assigning it as the value of the |1=
parameter or passing it as the only unnamed parameter. For example, calling this template as either {{Unknown|T.B.D.}} or {{Unknown|1=T.B.D.}} both produce the following table cell:
Parameters
Changes to the template's appearance when parsed are accomplished by adding parameters to the template call in the form of {{Unknown|name=value}}. Use as many or as few as needed to accomplish the desired appearance.
All available template parameters
Name
|
Value
|
|1=
|
Replaces the default ??? cell contents, can include wiki markup syntax (may also be provided as the only unnamed parameter)
|
|align=
|
Aligns the cell contents to either of the horizontal margins, rather than the default center alignment; valid values are left or right
|
|bgcolor=
|
Specify a different background color — values may be:
- CSS3 keywords like transparent or none (inheriting the surrounding background color or becoming white, respectively)
- Named CSS3 colors like moccasin or gainsboro
- RGB or RGBA hexadecimal values, in either the short (#ccc;) or long (#ffe228;) forms, always terminated with a semicolon (lowercase letters are preferred due to superior gzip compression)
|
|style=
|
Any other CSS3 inline style elements desired, in addition to or instead of, the default formatting (each one terminated with a semicolon)
|
Default style
This template uses the following CSS elements as its defaults. Those without an explicit override parameter above can still be changed, if necessary, by adding them as a value for the |style=
parameter and affixing them with a space and !important placed before the terminating semicolon.
<td style="background-color: #d3d3d3; color: black; font-size: 1.08em; font-weight: 800; padding: 0.2em 0.67em; text-align: center; vertical-align: middle;">
An example of such an override (in this instance changing the font-weight parameter, which controls the level of typeface boldness, to the light semi-bolded value of 500) would look like:
{{Unknown|style=font-weight: 500 !important;}} which then appears as
See also