Difference between revisions of "Template:Documentation"

From Mystcraft
Jump to: navigation, search
(Created page with "This is intended to be used in a CSS context as a shorter way of expressing border radii. It uses several vendor-specific prefixes, as well as the standard CSS3 <code>border-r...")
Line 1: Line 1:
This is intended to be used in a CSS context as a shorter way of expressing border radii. It uses several vendor-specific prefixes, as well as the standard CSS3 <code>border-radius</code>.
+
<div class="plainlinks" style=" clear: both; margin: 1em 0 0 0; border: 1px solid #aaa; background-color: #ecfcf4; padding: 5px; {{border radius|.4em}}">
 
+
<h2><span style="float: right; font-size: small">
==Examples==
+
([[{{{1|{{FULLPAGENAME}}/doc}}}|<span title="View this documentation">view</span>]] - {{
<pre>
+
#ifexist:{{{1|{{TALKSPACE}}:{{PAGENAME}}}}}/doc|[[{{{1|{{TALKSPACE}}:{{PAGENAME}}}}}/doc|<span title="Discuss this documentation">talk</span>]] -&nbsp;
<div style="border: 1px solid black; {{border radius|5px}}">Test</div>
+
}}[{{fullurl:{{{1|{{FULLPAGENAME}}/doc}}}|action=edit}} <span title="Edit this documentation">edit</span>] -
</pre>
+
[{{fullurl:{{{1|{{FULLPAGENAME}}/doc}}}|action=history}} <span title="Documentation history">history</span>] -
Produces:
+
[{{fullurl:{{{1|{{FULLPAGENAME}}/doc}}}|action=purge}} <span title="Purge this documentation (causes it to be updated; use only if it doesn't update after editing, NOT in a preview)">purge</span>])</span> Documentation</h2>
<div style="border: 1px solid black; {{border radius|5px}}">Test</div>
+
__NOTOC__ __NOEDITSECTION__
Source:
+
{{ {{{1|{{FULLPAGENAME}}/doc}}} }}
<pre>
+
</div>
<div style="border: 1px solid black; border-radius: 5px; -webkit-border-radius: 5px;  
+
{{#if:{{{nocat|}}}||[[Category:Templates]]}}
-moz-border-radius: 5px; -o-border-radius: 5px; -ms-border-radius: 5px;">Test</div>
 
</pre>
 
==Technical==
 
A semicolon after the template (<code><nowiki>{{border radius|4px}};</nowiki></code>) '''is not necessary'''. This template ends with a semicolon. Extra semicolons could cause problems in a few browsers.
 
 
 
This doesn't yet support specific corners, since CSS3 and the Webkit-specific version use <code>top-right-border-radius</code> and <code>-webkit-top-right-border-radius</code> (respectively), while Mozilla uses <code>-moz-border-radius-topright</code>.  Feel free to implement this (it shouldn't be too hard), but '''''please''''' test it on your user page or at [[/Sandbox]] '''''before''''' changing this template. Bad CSS on the [[main page]] is not good.
 
 
 
<includeonly>[[Category:Formatting Templates]]</includeonly>
 
<noinclude>[[Category:Template documentation]]</noinclude>
 

Revision as of 10:12, 24 July 2015