Difference between revisions of "Template:Demo begin/doc"

From blackwiki
Jump to navigation Jump to search
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
imported>Andrybak
(→‎Optional attributes: simplify syntax)
Line 9: Line 9:
  
 
==Optional attributes==
 
==Optional attributes==
−
{{{!}} class="wikitable"
+
{| class="wikitable"
−
! style="width:20%'" {{!}} Attribute name
+
! style="width:20%'" | Attribute name
−
! style="width:25%'" {{!}} Default value
+
! style="width:25%'" | Default value
−
! style="width:55%'"{{!}} Usage
+
! style="width:55%'"| Usage
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''class'''</kbd> {{!}}{{!}} {{space}} {{!}}{{!}} Additional classes, such as <kbd>collapsed</kbd> or <kbd>plainlinks</kbd>
+
| <kbd>'''class'''</kbd> || {{space}} || Additional classes, such as <kbd>collapsed</kbd> or <kbd>plainlinks</kbd>
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''background-style'''</kbd> {{!}}{{!}} {{space}} {{!}}{{!}} Any valid [[CSS]] 'background:' style
+
| <kbd>'''background-style'''</kbd> || {{space}} || Any valid [[CSS]] 'background:' style
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''bgcolor'''</kbd> {{!}}{{!}} eee {{!}}{{!}} If <kbd>background-style</kbd> is not used, enter any valid [[CSS]] 'background-color:' hexadecimal value (do not include the hash mark '#')
+
| <kbd>'''bgcolor'''</kbd> || eee || If <kbd>background-style</kbd> is not used, enter any valid [[CSS]] 'background-color:' hexadecimal value (do not include the hash mark '#')
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''border-style'''</kbd> {{!}}{{!}} thin dotted #{{{border}}} {{!}}{{!}} Any valid [[CSS]] 'border:' style
+
| <kbd>'''border-style'''</kbd> || thin dotted #{{{border}}} || Any valid [[CSS]] 'border:' style
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''border'''</kbd> {{!}}{{!}} 666 {{!}}{{!}} Enter any valid [[CSS]] 'border-color:' hexadecimal value (do not include the hash mark '#'); <kbd>border-style</kbd> takes precedence for the outside border, but <kbd>border</kbd> is used in other places, too.
+
| <kbd>'''border'''</kbd> || 666 || Enter any valid [[CSS]] 'border-color:' hexadecimal value (do not include the hash mark '#'); <kbd>border-style</kbd> takes precedence for the outside border, but <kbd>border</kbd> is used in other places, too.
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''margin-style'''</kbd> {{!}}{{!}} {{{top}}} {{{right}}} {{{bottom}}} {{{left}}} {{!}}{{!}} Any combination of valid [[CSS]] measurements (include the units; 'em', '%', 'in', 'pt', etc.)
+
| <kbd>'''margin-style'''</kbd> || {{{top}}} {{{right}}} {{{bottom}}} {{{left}}} || Any combination of valid [[CSS]] measurements (include the units; 'em', '%', 'in', 'pt', etc.)
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''top'''</kbd> {{!}}{{!}} 0 {{!}}{{!}} If <kbd>margin-style</kbd> is not used, set the top margin (defaults to '0', no extra spacing on top)
+
| <kbd>'''top'''</kbd> || 0 || If <kbd>margin-style</kbd> is not used, set the top margin (defaults to '0', no extra spacing on top)
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''right'''</kbd> {{!}}{{!}} 0 {{!}}{{!}} If <kbd>margin-style</kbd> is not used, set the right margin (defaults to '0', no extra spacing)
+
| <kbd>'''right'''</kbd> || 0 || If <kbd>margin-style</kbd> is not used, set the right margin (defaults to '0', no extra spacing)
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''bottom'''</kbd> {{!}}{{!}} 0.125in {{!}}{{!}} If <kbd>margin-style</kbd> is not used, set the bottom margin (defaults to '0.125in' (1/8") spacing on the bottom)
+
| <kbd>'''bottom'''</kbd> || 0.125in || If <kbd>margin-style</kbd> is not used, set the bottom margin (defaults to '0.125in' (1/8") spacing on the bottom)
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''left'''</kbd> {{!}}{{!}} 0.25in {{!}}{{!}} If <kbd>margin-style</kbd> is not used, set the left margin (defaults to '0.25in' (1/4") spacing on the left, which matches the indent of most list styles)
+
| <kbd>'''left'''</kbd> || 0.25in || If <kbd>margin-style</kbd> is not used, set the left margin (defaults to '0.25in' (1/4") spacing on the left, which matches the indent of most list styles)
−
{{!}}- style="vertical-align:top"
+
|- style="vertical-align:top"
−
{{!}} <kbd>'''padding-style'''</kbd> {{!}}{{!}} 0.125in {{!}}{{!}} Works identically to 'margin-style'; default is 1/8" padding on all inside edges
+
| <kbd>'''padding-style'''</kbd> || 0.125in || Works identically to 'margin-style'; default is 1/8" padding on all inside edges
−
{{!}}}
+
|}
  
 
=== See also ===
 
=== See also ===

Revision as of 11:35, 4 July 2020

Usage

To generate the example demonstration, you would type:

{{Demo begin}}
<big>The demo goes here.</big>
{{Demo end}}

Optional attributes

Attribute name Default value Usage
class Template:Space Additional classes, such as collapsed or plainlinks
background-style Template:Space Any valid CSS 'background:' style
bgcolor eee If background-style is not used, enter any valid CSS 'background-color:' hexadecimal value (do not include the hash mark '#')
border-style thin dotted #{{{border}}} Any valid CSS 'border:' style
border 666 Enter any valid CSS 'border-color:' hexadecimal value (do not include the hash mark '#'); border-style takes precedence for the outside border, but border is used in other places, too.
margin-style {{{top}}} {{{right}}} {{{bottom}}} {{{left}}} Any combination of valid CSS measurements (include the units; 'em', '%', 'in', 'pt', etc.)
top 0 If margin-style is not used, set the top margin (defaults to '0', no extra spacing on top)
right 0 If margin-style is not used, set the right margin (defaults to '0', no extra spacing)
bottom 0.125in If margin-style is not used, set the bottom margin (defaults to '0.125in' (1/8") spacing on the bottom)
left 0.25in If margin-style is not used, set the left margin (defaults to '0.25in' (1/4") spacing on the left, which matches the indent of most list styles)
padding-style 0.125in Works identically to 'margin-style'; default is 1/8" padding on all inside edges

See also