Template:Partial: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(Allow "Partial" text to be overridden)
(Upgrade template to match feature set of Template:Unknown)
Line 1: Line 1:
<noinclude>{| class="wikitable"
<noinclude>{| class="wikitable" style="margin-left: 1.5em;"
|</noinclude> class="table-partial" style="background-color: {{{bgcolor|#ff0}}}; color: #000; font-size: 1.08em; font-weight: 700; padding: 0.2em 0.67em; text-align: {{{align|center}}}; vertical-align: middle; {{{style|}}}" {{!}} {{{1|Partial}}}<noinclude>
|</noinclude>style="background: #FFFF00; color: black; vertical-align: middle; text-align:center;" class="table-partial"{{!}}{{{1|Partial}}}<noinclude>
[[Category:Formatting templates]]</noinclude>
<!-- Categories go here. -->
[[Category:Table cell templates]]</noinclude>

Latest revision as of 00:15, 13 September 2022

[edit] Template documentation
Emblem-important-yellow.png NOTICE: This is a documentation subpage for Template:Partial:
It contains usage information, categories and other content that is not part of the original template page.

The {{Partial}} template creates a table cell with a bright yellow background and black, larger heavy text which defaults to the word 'Partial', 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):


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" | Documentation complete?
  ! scope="col" | Development stage
  | {{Partial}}
  | {{Beta}}

Documentation complete? Development stage
Partial Beta

Custom text

The word 'Partial' that is 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 {{Partial|Incomplete}} or {{Partial|1=Incomplete}} both produce the following table cell:



Changes to the template's appearance when parsed are accomplished by adding parameters to the template call in the form of {{Partial|name=value}}. Use as many or as few as needed to accomplish the desired appearance.

All available template parameters
Name Value
Text that replaces the default Partial cell contents, and can include wiki markup syntax
|align= Aligns the cell contents to either of the horizontal margins, rather than the default center alignment; valid values are left or right
|bgcolor= Override the default background color (#ff0) — values should not be terminated with a semicolon.
Valid color formats are:
  • 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 (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: #ff0; color: black; font-size: 1.08em; font-weight: 700; padding: 0.2em 0.67em; text-align: center; vertical-align: middle;">

An example of such overrides, should we wish to change the font-size and font-weight values (which control the typeface height and boldness, respectively) to the default text size and normal weight, would look like:

{{Partial|style=font-size: 1em !important; font-weight: 400 !important;}}  which then appears as  

See also