Template:SpoilerBox: Difference between revisions

Add special handling for color=default
m (removed superfluous period)
(Add special handling for color=default)
 
Line 2: Line 2:


There are also arguments for title & color, for example {{T|SpoilerBox|text=internal text|title=title|color=green}} gives {{SpoilerBox|text=internal text|title=title|color=green}}
There are also arguments for title & color, for example {{T|SpoilerBox|text=internal text|title=title|color=green}} gives {{SpoilerBox|text=internal text|title=title|color=green}}
The color argument also accepts 'default' as a special value, which causes the title text to remain as the default wiki text color. For example:
{{T|SpoilerBox|text=internal text|title=Default text color|color=default}} gives {{SpoilerBox|text=internal text|title=Default text color|color=default}}


<onlyinclude><includeonly>{| class="wikitable mw-collapsible mw-collapsed"
<onlyinclude><includeonly>{| class="wikitable mw-collapsible mw-collapsed"
! style="color: {{{color|red}}};" | {{{title|The following content contains spoilers! Expand to view.}}}
! {{#ifeq:{{{color}}}|default||style="color: {{{color|red}}};"}} | {{{title|The following content contains spoilers! Expand to view.}}}
|-
|-
| {{{text}}}
| {{{text}}}
|}</includeonly></onlyinclude>
|}</includeonly></onlyinclude>