21 Aug 2020 - The wiki is undergoing a major cleanup. If you arrived here from a search engine and cannot find the page, please use the wiki search instead (top right corner of page)
More info can be found on the forum

Difference between revisions of "Template:Unknown"

From Official Kodi Wiki
Jump to: navigation, search
(Fix display of example in documentation)
(Minor documentation improvements)
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|&#8239;???&#8239;}}}<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|&#8239;???&#8239;}}}<noinclude>
 
|}
 
|}
 
{{Documentation|content=__NOTOC__
 
{{Documentation|content=__NOTOC__
 
=== Purpose ===
 
=== 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:
 
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%;">&#8239;[[Template:Yes|Yes]]&#8239;</td></tr></table>and&nbsp;&nbsp;&nbsp;&nbsp;<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%;">&#8239;[[Template:No|No]]&#8239;</td></tr></table>
+
<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%;">&#8239;[[Template:Yes|Yes]]&#8239;</td></tr></table>or&nbsp;&nbsp;&nbsp;&nbsp;<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%;">&#8239;[[Template:No|No]]&#8239;</td></tr></table>or&nbsp;&nbsp;&nbsp;&nbsp;<table class="wikitable" style="display: inline-table;"><tr><td class="table-partial" style="background: #ffff00; color: #000; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;">&#8239;[[Template:Partial|Partial]]&#8239;</td></tr></table>
  
 
=== Usage ===
 
=== Usage ===
 
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:
 
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;">
+
<poem style="display: inline-block; margin: 0.5em 2.5em 0.5em 6em; width: 30%; padding:15px 15px 15px 15px; background: cornsilk; border: 1px solid #000;">
 
  {| class="wikitable"
 
  {| class="wikitable"
 
   |-
 
   |-
   | Template documented?
+
   ! Template documented?
   | Template categorized?
+
   ! Template categorized?
 
   |-
 
   |-
 
   | '''<nowiki>{{Unknown}}</nowiki>'''
 
   | '''<nowiki>{{Unknown}}</nowiki>'''
 
   | <nowiki>{{Yes}}</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">&#8239;???&#8239;</td><td style="background: #90ff90; color: black; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;" class="table-yes">&#8239;Yes&#8239;</td></tr></table>
+
</poem><table class="wikitable" style="display: inline-block; margin: 2em 0 3em 2.5em;"><tr><th>Template documented?</th><th>Template categorized?</th></tr><tr><td style="background: #d3d3d3; color: black; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;" class="table-unknown">&#8239;???&#8239;</td><td style="background: #90ff90; color: black; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;" class="table-yes">&#8239;Yes&#8239;</td></tr></table>
  
 
==== Custom cell text ====
 
==== 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:
+
The question marks as the cell's content 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, calling this template with either '''<kbd><nowiki>{{Unknown|TBD}}</nowiki></kbd>''' or '''<kbd><nowiki>{{Unknown|1=TBD}}</nowiki></kbd>''' formatting, 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">&#8239;TBD&#8239;</td></tr></table>
 
<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">&#8239;TBD&#8239;</td></tr></table>
  
==== Available named parameters ====
+
==== 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)
+
<table class="wikitable"><caption>All available template parameters</caption>
:<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)
+
<tr><th><code><nowiki>|1=</nowiki></code></th>
:<code><nowiki>|style=</nowiki></code> (for any other CSS style elements desired beyond the standard formatting)
+
  <td>overrides default <span style="color: #000; font-weight: 800; font-size: 108%;">&#8239;???&#8239;</span> contents (may also be provided as only unnamed parameter)</td></tr>
 +
<tr><th><code><nowiki>|align=</nowiki></code></th>
 +
  <td>values of <kbd>left</kbd> or <kbd>right</kbd> align the cell contents to that horizontal edge, overriding the default center alignment</td></tr>
 +
<tr><th><code><nowiki>|bgcolor=</nowiki></code></th>
 +
  <td>changes the background color, always terminated with a semicolon — values may be:
 +
* named CSS colors like <kbd>moccasin;</kbd>
 +
* short RGB hexadecimals like <kbd>#ccc;</kbd> or long ones like <kbd>#ffe228;</kbd>
 +
* a keyword like <kbd>transparent</kbd> or <kbd>none</kbd> to either inherit/disable the background</td></tr>
 +
<tr><th><code><nowiki>|style=</nowiki></code></th>
 +
  <td>for any other CSS style elements desired beyond the standard formatting</td></tr></table>
 +
 
 +
=== 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 <code><nowiki>|style=</nowiki></code> parameter with a space and <kbd>!important</kbd> placed before the terminating semicolon.
 +
 
 +
:<code>style="background: #d3d3d3; color: #000; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;" class="table-unknown"</code>
 +
 
 +
 
 +
An example of such an override (in this instance changing the font-weight parameter which controls the level of typeface boldness to the unbolded value of 500) would look like:
 +
 
 +
:'''<code><nowiki>{{Unknown|style=font-weight: 500 !important;}}</nowiki></code>'''&nbsp;&nbsp;which then appears as&nbsp;&nbsp;&nbsp;&nbsp;<table class="wikitable" style="display: inline-table; vertical-align: middle;"><tr><td class="table-unknown" style="background: #90ff90; color: #000; vertical-align: middle; text-align: center; font-weight: 500; font-size: 108%;">&#8239;???&#8239;</td></tr></table>
  
 
=== See also ===
 
=== See also ===
 
* {{Tl|Yes}}
 
* {{Tl|Yes}}
 
* {{Tl|No}}
 
* {{Tl|No}}
 +
* {{Tl|Partial}}
 
* {{Tl|Beta}}
 
* {{Tl|Beta}}
 
* [[:Category:Formatting templates|Category: Formatting templates]]
 
* [[:Category:Formatting templates|Category: Formatting templates]]
 
}}
 
}}
 
[[Category:Formatting templates]]</noinclude>
 
[[Category:Formatting templates]]</noinclude>

Revision as of 23:06, 18 January 2020

 ??? 
Template documentation

1 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:

Yes
or    
No
or    
Partial

2 Usage

The template will only function properly when used inside of the standard wikicode for tables, following the | character(s) which indicate the table cell. In practice, it looks like this when editing and then when parsed:

 {| class="wikitable"
  |-
  ! Template documented?
  ! Template categorized?
  |-
  | {{Unknown}}
  | {{Yes}}
  |}

Template documented?Template categorized?
 ???  Yes 

2.1 Custom cell text

The question marks as the cell's content can be replaced with any text desired by assigning it to the value of the |1= parameter or passing it as the only unnamed parameter. For example, calling this template with either {{Unknown|TBD}} or {{Unknown|1=TBD}} formatting, as both produce the following table cell when transcluded and parsed:

 TBD 

2.2 Parameters

All available template parameters
|1= overrides default  ???  contents (may also be provided as only unnamed parameter)
|align= values of left or right align the cell contents to that horizontal edge, overriding the default center alignment
|bgcolor= changes the background color, always terminated with a semicolon — values may be:
  • named CSS colors like moccasin;
  • short RGB hexadecimals like #ccc; or long ones like #ffe228;
  • a keyword like transparent or none to either inherit/disable the background
|style= for any other CSS style elements desired beyond the standard formatting

3 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 with a space and !important placed before the terminating semicolon.

style="background: #d3d3d3; color: #000; vertical-align: middle; text-align: center; font-weight: 800; font-size: 108%;" class="table-unknown"


An example of such an override (in this instance changing the font-weight parameter which controls the level of typeface boldness to the unbolded value of 500) would look like:

{{Unknown|style=font-weight: 500 !important;}}  which then appears as    
 ??? 

4 See also