Template:Box: Difference between revisions

Create box template for notices (very simple for now)
 
Nescap (talk | contribs)
m fixed background color to work with dark mode
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
<onlyinclude><includeonly>{| class="wikitable"
<includeonly>
|-
{| class="wikitable"
|style="background: #efefef;" |{{{1|}}}
|-
|}</includeonly></onlyinclude>{{Box|Example.}}
|style="background: var(--background-color-interactive-subtle,#f8f9fa);" |{{{1|}}}
|}
</includeonly>
 
<noinclude>


== Usage ==
== Usage ==
Add this to the source editor
<pre>
<pre>
{{Box|Example}}
<nowiki>
{{Box|Example of text in a box}}
</nowiki>
</pre>
</pre>
to create a box with around the text like this: {{Box|Example of text in a box}}
[[Category:Styling templates]]
== Template Data ==
<templatedata>
{
"params": {
"1": {
"description": "Text to put in the box",
"type": "string",
"required": true
}
},
"paramOrder": [
"1"
],
"description": "Create a box containing text"
}
</templatedata>
</noinclude>