Difference between revisions of "Template:C"

From Maths
Jump to: navigation, search
(Created page with "<noinclude> This is like the <code>M</code> template on [http://maths.kisogo.com maths.kisogo.com] only for code instead, adds a code block with optional styling. {| class="w...")
 
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
This is like the <code>M</code> template on [http://maths.kisogo.com maths.kisogo.com] only for code instead, adds a code block with optional styling.
+
[[Category:Markup templates]]
 +
This is like the <code>M</code> template only for code instead, adds a code block with optional styling.
 +
 
 +
Note that it uses a <code>&lt;span&gt;</code> tag instead of the <code>&lt;code&gt;</code> tags
  
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
Line 16: Line 19:
 
| Optional styling, eg <code>color:#ffffff;</code> for white font
 
| Optional styling, eg <code>color:#ffffff;</code> for white font
 
|}
 
|}
</noinclude><code {{#if:{{{style}}}|style="{{{style}}}"|}}>{{{1|}}}</code>
+
</noinclude><includeonly><span style="font-family: monospace,Courier;color: #000;background-color: #F9F9F9;border: 1px solid #DDD;border-radius: 2px;padding: 1px 4px;{{{style|}}}">{{{1|}}}</span></includeonly>

Latest revision as of 14:52, 19 February 2016

This is like the M template only for code instead, adds a code block with optional styling.

Note that it uses a <span> tag instead of the <code> tags

Attribute Default Comment
1 (empty string) This is the code to show
style (empty string) Optional styling, eg color:#ffffff; for white font