https://wiki.sc4devotion.com/index.php?title=Template:Hidden_begin/doc&feed=atom&action=history
Template:Hidden begin/doc - Revision history
2024-03-28T10:47:49Z
Revision history for this page on the wiki
MediaWiki 1.33.0
https://wiki.sc4devotion.com/index.php?title=Template:Hidden_begin/doc&diff=49154&oldid=prev
Jdenm8: Created page with "{{Documentation subpage}} <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> {{hatnote|This documenta..."
2019-08-30T15:08:26Z
<p>Created page with "{{Documentation subpage}} <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see <a href="https://en.wikipedia.org/wiki/Wikidata" class="extiw" title="wikipedia:Wikidata">Wikipedia:Wikidata</a>) --> {{hatnote|This documenta..."</p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --><br />
{{hatnote|This documentation is shared by {{tl|Hidden begin}} and {{tl|Hidden end}}.}}<br />
{{#ifeq: {{FULLPAGENAME}} | Template:Hidden begin<br />
| {{high-risk| 169038 }}<br />
| {{#ifeq: {{FULLPAGENAME}} | Template:Hidden end<br />
| {{high-risk| 169128 }}<br />
}}<br />
}}<br />
<br />
Do not use this template to hide content in articles. This violates the [[WP:Manual of Style#Scrolling lists and collapsible content|WP:Manual of Style ยง Scrolling lists and collapsible content]] and [[WP:Accessibility]] guidelines. This template is intended for use in pages in [[Wikipedia:Namespaces|namespaces]] other than the article namespace. <br />
<br />
==Syntax==<br />
<br />
<pre style="overflow:auto;"><br />
{{Hidden begin<br />
| expanded = <!--"true", "on", yes", etc, otherwise omit--><br />
| showhide = <!--"left", otherwise omit--><br />
| class = <br />
| style = <br />
| border =<br />
| title = <br />
| titlestyle = <br />
| bg1 = <br />
| ta1 = <br />
| contentstyle = <br />
| bg2 = <br />
| ta2 = <br />
<!--Older, semi-deprecated parameters:--><br />
| header = | extra1 = | extra2 = <br />
}}<br />
<!----[content to be hidden placed here]----><br />
{{Hidden end}}<br />
</pre><br />
<br />
===Parameters===<br />
{| class="wikitable"<br />
! Parameter || Description<br />
|-<br />
| ''showhide''<!--previously: <br />or ''toggle''--> || Set to "left" (without speechmarks) to switch the [show/hide] link's position from the righthand end of the titlebar (default) to the left.<br />
|-<br />
| ''expanded'' || Set to anything ("true", "yes", etc.) to switch the hidden section's initial state from collapsed (hidden) to expanded (visible).<br />
|-<br />
| ''class'' || [[WP:CLASS#Classes|Class attribute]] affecting entire area.<br />
|-<br />
| ''style'' || [[Cascading Style Sheets|CSS styling]] affecting entire area (titlebar and hidden/hideable content).<br />
|-<br />
| ''border'' || CSS styling for border around entire area. Will be overridden by any border styles in ''style''.<br />
|-<br />
| ''title'' || Text shown in titlebar.<br />
|-<br />
| style="vertical-align:top;" | ''titlestyle'' || CSS styles to apply to the titlebar (e.g. {{para|titlestyle|border:1px solid lightgrey;}} to produce a border around it; {{para|titlestyle|background:''color'';}} to set its background color to [[Web colors#X11 color names|''color'']]&thinsp;; {{para|titlestyle|text-align:[center/right];}} to switch its text (''title'')'s alignment from left to center or right; etc.).<br />
|-<br />
| ''bg1'' || Background color for titlebar; defaults to transparent. May be overridden if ''titlestyle'' includes anything that changes the background.<br />
|-<br />
| ''ta1'' || Text alignment for titlebar; defaults to left. May be overridden if ''titlestyle'' includes anything that changes the text alignment.<br />
|-<br />
| ''contentstyle''&nbsp; || CSS styling to apply to the hidden/hideable content (e.g. background and text-align, per ''titlestyle'').<br />
|-<br />
| ''bg2'' || Background color for content; defaults to transparent. May be overridden if ''contentstyle'' includes anything changes the background.<br />
|-<br />
| ''ta2'' || Text alignment for content; defaults to left. May be overridden if ''contentstyle'' includes anything that changes the text alignment.<br />
|}<br />
<br />
==Examples==<br />
<br />
===Example 1===<br />
<source lang="moin" style="overflow:auto;"><br />
{{Hidden begin |title=Default example}}<br />
* def<br />
* ghi<br />
{{Hidden end}}<br />
</source><br />
{{Hidden begin{{#ifeq:{{SUBPAGENAME}}|sandbox |/sandbox}} |title=Default example}}<br />
* def<br />
* ghi<br />
{{Hidden end}}<br />
<br />
===Example 2===<br />
<source lang="moin" style="overflow:auto;"><br />
{{Hidden begin<br />
| titlestyle = background:pink;<br />
| title = ''titlestyle'' is "background:pink;"<br />
}}<br />
* def<br />
* ghi<br />
{{Hidden end}}<br />
</source><br />
{{Hidden begin{{#ifeq:{{SUBPAGENAME}}|sandbox |/sandbox}}<br />
| titlestyle = background:pink;<br />
| title = ''titlestyle'' is "background:pink;"<br />
}}<br />
* def<br />
* ghi<br />
{{Hidden end}}<br />
<br />
===Example 3===<br />
<source lang="moin" style="overflow:auto;"><br />
{{Hidden begin<br />
| titlestyle = background:pink; text-align:center;<br />
| title = added "text-align:center;"<br />
}}<br />
* def<br />
* ghi<br />
{{Hidden end}}<br />
</source><br />
{{Hidden begin{{#ifeq:{{SUBPAGENAME}}|sandbox |/sandbox}}<br />
| titlestyle = background:pink; text-align:center;<br />
| title = added "text-align:center;"<br />
}}<br />
* def<br />
* ghi<br />
{{Hidden end}}<br />
<br />
===Example 4===<br />
<source lang="moin" style="overflow:auto;"><br />
{{Hidden begin<br />
| titlestyle = background:pink; text-align:right; padding-right:3.0em;<br />
| title = ''title'' on right with 3.0em padding<br />
}}<br />
* change window width and<br />
* watch title alignment<br />
{{Hidden end}}<br />
</source><br />
{{Hidden begin{{#ifeq:{{SUBPAGENAME}}|sandbox |/sandbox}}<br />
| titlestyle = background:pink; text-align:right; padding-right:3.0em;<br />
| title = ''title'' on right with 3.0em padding<br />
}}<br />
* change window width and<br />
* watch title alignment<br />
{{Hidden end}}<br />
<br />
===Example 5===<br />
<source lang="moin" style="overflow:auto;"><br />
{{Hidden begin |showhide=left |expanded=true<br />
| titlestyle = background:palegreen;<br />
| title = ''showhide'' set to "left" and ''expanded'' set to "true"<br />
}}<br />
* def<br />
* ghi<br />
{{Hidden end}}<br />
</source><br />
{{Hidden begin{{#ifeq:{{SUBPAGENAME}}|sandbox |/sandbox}} |showhide=left |expanded=true<br />
| titlestyle = background:palegreen;<br />
| title = ''showhide'' set to "left" and ''expanded'' set to "true"<br />
}}<br />
* def<br />
* ghi<br />
{{Hidden end}}<br />
<br />
===Example 6===<br />
<pre style="overflow:auto;"><br />
{{Hidden begin |showhide=left<br />
| titlestyle = background:palegreen;<br />
| title = <code style="background:transparent;">showhide=left</code>, hidden content 150% size and in bold (''contentstyle'')<br />
| contentstyle = font-size:150%; font-weight:bold;<br />
}}<br />
* def<br />
* ghi<br />
{{Hidden end}}<br />
</pre><br />
{{Hidden begin{{#ifeq:{{SUBPAGENAME}}|sandbox |/sandbox}} |showhide=left<br />
| titlestyle = background:palegreen;<br />
| title = <code style="background:transparent;">showhide=left</code>, hidden content 150% size and in bold (''contentstyle'')<br />
| contentstyle = font-size:150%; font-weight:bold;<br />
}}<br />
* def<br />
* ghi<br />
{{Hidden end}}<br />
<br />
===Example 7===<br />
<!-- This example updated to show that bg1/ta1 only affect titlebar, used ta1=right since it is non-default for titlebar and content. --><br />
<pre style="overflow:auto;"><br />
{{Hidden begin<br />
| header = [''header'' (deprecated)]<br />
| titlestyle = font-style:italic; padding-right:3.0em;<br />
| title = [''title'' set to this text]<br />
| border = 1px solid grey<br />
| bg1 = palegreen<br />
| ta1 = right<br />
| extra1 = font-size:120%; <!--semicolon required since titlestyle is used--><br />
| extra2 = font-size:150% <!--semicolon optional when contentstyle not used--><br />
}}<br />
* make window narrower and<br />
* title will wrap<br />
{{Hidden end}}<br />
</pre><br />
{{Hidden begin{{#ifeq:{{SUBPAGENAME}}|sandbox |/sandbox}}<br />
| header = [''header'' (deprecated)]<br />
| titlestyle = font-style:italic; padding-right:3.0em;<br />
| title = [''title'' set to this text]<br />
| border = 1px solid grey<br />
| bg1 = palegreen<br />
| ta1 = right<br />
| extra1 = font-size:120%;<br />
| extra2 = font-size:150%<br />
}}<br />
* make window narrower and<br />
* title will wrap<br />
{{Hidden end}}<br />
<br />
===Example 8===<br />
<source lang="text" style="overflow:auto;"><br />
{{Hidden begin<br />
| titlestyle =<br />
| title = title&nbsp;with&nbsp;non-breaking&nbsp;spaces&nbsp;<br />
| border = 1px solid red<br />
| bg1 = cyan<br />
| bg2 = yellow<br />
| ta1 = right<br />
| ta2 = left<br />
| extra1 = font-size:120%; padding-right:2.5em;<br />
| extra2 = font-size:150%; padding-left:3.0em;<br />
}}<br />
* def ... these should have left padding<br />
* ghi<br />
{{Hidden end}}<br />
</source><br />
{{Hidden begin{{#ifeq:{{SUBPAGENAME}}|sandbox |/sandbox}}<br />
| titlestyle =<br />
| title = title&nbsp;with&nbsp;non-breaking&nbsp;spaces&nbsp;<br />
| border = 1px solid red<br />
| bg1 = cyan<br />
| bg2 = yellow<br />
| ta1 = right<br />
| ta2 = left<br />
| extra1 = font-size:120%; padding-right:2.5em;<br />
| extra2 = font-size:150%; padding-left:3.0em;<br />
}}<br />
* def ... these should have left padding<br />
* ghi<br />
{{Hidden end}}<br />
<br />
==See also==<br />
* {{tl|Hidden}}<br />
<br />
<includeonly>{{basepage subpage<br />
| <!-- ADD CATEGORIES BELOW THIS LINE --><br />
[[Category:Collapse templates]]<br />
}}</includeonly></div>
Jdenm8