https://kodi.wiki/index.php?title=Template:Partial/doc&feed=atom&action=historyTemplate:Partial/doc - Revision history2024-03-28T14:04:56ZRevision history for this page on the wikiMediaWiki 1.39.6https://kodi.wiki/index.php?title=Template:Partial/doc&diff=242990&oldid=prevRogueScholar: Create template documentation page2022-09-13T17:41:17Z<p>Create template documentation page</p>
<p><b>New page</b></p><div>__NOTOC__<br />
{{Notice|It contains usage information, categories and other content that is not part of the original template page.|''NOTICE:'' This is a documentation subpage for [[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}<br /><br />
<br />
The <kbd style="font-size: 1.15em; font-weight: 800;"><nowiki>{{</nowiki>[[Template:Partial|Partial]]<nowiki>}}</nowiki></kbd> 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):<br />
<div style="margin: 1.5em auto; width: fit-content;"><br />
{| class="wikitable" style="display: inline-table; margin: 1em; vertical-align: middle;"<br />
| class="table-yes" style="background-color: #90ff90; font-size: 1.08em; font-weight: 700; padding: 0.2em 0.67em; text-align: center; vertical-align: middle;" | [[Template:Yes|Yes]]<br />
|}<br />
{| class="wikitable" style="display: inline-table; margin: 1em; vertical-align: middle;"<br />
| class="table-no" style="background-color: #ff9090; font-size: 1.08em; font-weight: 700; padding: 0.2em 0.67em; text-align: center; vertical-align: middle;" | [[Template:No|No]]<br />
|}<br />
{| class="wikitable" style="display: inline-table; margin: 1em; vertical-align: middle;"<br />
| class="table-beta" style="background-color: #33fcff; font-size: 1.08em; font-weight: 700; padding: 0.2em 0.67em; text-align: center; vertical-align: middle;" | [[Template:Beta|Beta]]<br />
|}<br />
{| class="wikitable" style="display: inline-table; margin: 1em; vertical-align: middle;"<br />
| class="table-unknown" style="background-color: #d3d3d3; font-size: 1.08em; font-weight: 700; padding: 0.2em 0.67em; text-align: center; vertical-align: middle;" | [[Template:Unknown|Unknown]]<br />
|}<br />
{| class="wikitable" style="display: inline-table; margin: 1em; vertical-align: middle;"<br />
| class="table-na" style="background-color: #ffc890; font-size: 1.08em; font-weight: 700; padding: 0.2em 0.67em; text-align: center; vertical-align: middle;" | [[Template:NA|N/A]]<br />
|}<br />
{| class="wikitable" style="display: inline-table; margin: 1em; vertical-align: middle;"<br />
| class="table-wip" style="background-color: #c9e0ff; font-size: 1.08em; font-weight: 700; padding: 0.2em 0.67em; text-align: center; vertical-align: middle;" | [[Template:Wip|W.I.P.]]<br />
|}<br />
{| class="wikitable" style="display: inline-table; margin: 1em; vertical-align: middle;"<br />
| class="table-disabled" style="background-color: #ff9090; font-size: 1.08em; font-weight: 700; padding: 0.2em 0.67em; text-align: center; vertical-align: middle;" | [[Template:Disabled|Disabled]]<br />
|}<br />
{| class="wikitable" style="display: inline-table; margin: 1em; vertical-align: middle;"<br />
| class="table-enabled" style="background-color: #90ff90; color: #000; font-size: 1.08em; font-weight: 700; padding: 0.2em 0.67em; text-align: center; vertical-align: middle;" | [[Template:Enabled|Enabled]]<br />
|}<br />
</div><br />
<br />
== Usage ==<br />
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:<br />
<div style="margin: 1.5em 0 1.5em 6em; vertical-align: middle;"><br />
<poem style="background-color: cornsilk; border: 2px solid #c7c8c9; color: #000; display: inline-block; font: 500 0.92rem/1.4 monospace; margin: 0 2.5em 0 0; min-width: 25vmax; padding: 0.5em 1em; vertical-align: middle;"><br />
{| class="wikitable"<br />
! scope="col" | Documentation complete?<br />
! scope="col" | Development stage<br />
|-<br />
| '''<nowiki>{{Partial}}</nowiki>'''<br />
| <nowiki>{{Beta}}</nowiki><br />
|}<br />
</poem> <span style="font-size: 1.5rem; font-weight: 900; margin: 0 1em;">⇒</span><br />
{| class="wikitable" style="display: inline-table; margin: 0 0 0 2.5em;"<br />
! scope="col" | Documentation complete?<br />
! scope="col" | Development stage<br />
|-<br />
| {{Partial}}<br />
| {{Beta}}<br />
|}<br />
</div><br />
<br />
=== Custom text ===<br />
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 {{Para|1}} parameter or passing it as the only unnamed parameter.<br />
<br />
For example, calling this template as either '''{{Tlx|Partial|Incomplete}}''' or '''{{Tlx|Partial|2=1=Incomplete}}''' both produce the following table cell:<br />
{| class="wikitable" style="margin-left: 3em;"<br />
| {{Partial|Incomplete}}<br />
|}<br />
<br />
=== Parameters ===<br />
Changes to the template's appearance when parsed are accomplished by adding parameters to the template call in the form of '''{{Tlx|Partial|2=<var>name</var>=<var>value</var>}}'''. Use as many or as few as needed to accomplish the desired appearance.<br />
{| class="wikitable" style="margin-left: 3em;"<br />
|+ All available template parameters<br />
! scope="col" | Name<br />
! scope="col" | Value<br />
|-<br />
! scope="row" | {{Para|1|<var>Text</var>}}<br />''or''<br /><span style="background-color: #f9f9f9; padding: 1px 4px;">{{Tlx|Partial|<var>Text</var>}}</span><br />
| Text that replaces the default <span style="font-size: 1.08em; font-weight: 700;">Partial</span> cell contents, and can include wiki markup syntax<br />
|-<br />
! scope="row" | {{Para|align}}<br />
| Aligns the cell contents to either of the horizontal margins, rather than the default center alignment; valid values are '''<kbd>left</kbd>''' or '''<kbd>right</kbd>'''<br />
|-<br />
! scope="row" | {{Para|bgcolor}}<br />
| Override the default background color (<code style="background-color: #ff0; color: #000;">#ff0</code>) — values should not be terminated with a semicolon.<br />
:Valid color formats are:<br />
::* CSS3 keywords like '''<kbd style="border: 1px solid #c7c8c9;">transparent</kbd>''' or '''<kbd style="background-color: #fff; border: 1px solid #c7c8c9;">none</kbd>''' (inheriting the surrounding background color or becoming white, respectively)<br />
::* Named CSS3 colors like '''<kbd style="background-color: moccasin; border: 1px solid #c7c8c9;">moccasin</kbd>''' or '''<kbd style="background-color: gainsboro; border: 1px solid #c7c8c9;">gainsboro</kbd>'''<br />
::* RGB or RGBA hexadecimal values, in either the short ('''<kbd style="background-color: #ccc; border: 1px solid #c7c8c9;">#ccc</kbd>''') or long ('''<kbd style="background-color: #ffe228; border: 1px solid #c7c8c9;">#ffe228</kbd>''') forms (lowercase letters are preferred due to superior gzip compression)<br />
|-<br />
! scope="row" | {{Para|style}}<br />
| Any other CSS3 inline style elements desired, in addition to or instead of, the default formatting (each one terminated with a semicolon)<br />
|}<br />
<br />
=== Default style ===<br />
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 {{Para|style}} parameter and affixing them with a space and <kbd>!important</kbd> placed before the terminating semicolon.<br />
<br />
::<syntaxhighlight lang="html" inline><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;"></syntaxhighlight><br /><br />
<br />
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:<br />
<div style="margin-left: 3em;">'''{{Tlx|Partial|2=style=font-size: 1em !important; font-weight: 400 !important;}}'''&nbsp;&nbsp;which then appears as&nbsp;&nbsp;<br />
{| class="wikitable" style="display: inline-table; vertical-align: middle;"<br />
| {{Partial|style=font-size: 1em !important; font-weight: 400 !important;}}<br />
|}<br />
</div><br />
<br />
== See also ==<br />
<div style="width: fit-content;"><ul style="display: inline-block; margin: 0 12em 0 1.6em; padding: 0;"><br />
<li>{{Tl|Yes}}</li><br />
<li>{{Tl|Enabled}}</li><br />
<li>{{Tl|Beta}}</li><br />
<li>{{Tl|NA}}</li><br />
<li>[[:Category:Formatting templates]]</li></ul><br />
<ul style="display: inline-block; margin: 0 0 0 1.6em; padding: 0;"><br />
<li>{{Tl|No}}</li><br />
<li>{{Tl|Disabled}}</li><br />
<li>{{Tl|Wip}}</li><br />
<li>{{Tl|Unknown}}</li><br />
<li>[[:Category:Table cell templates]]</li></ul><br />
</div><includeonly><br />
<!-- Categories go here. --><br />
<br />
[[Category:Table cell templates]]</includeonly><noinclude><br />
<br />
<br />
[[Category:Template documentation pages]]</noinclude></div>RogueScholar