Difference between revisions of "Template:Accidental"

From blackwiki
Jump to navigation Jump to search
blackwiki>Dbolton
m (28 revisions imported)
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<span class="accidental" style="font-family: Lucida Sans Unicode, Arial Unicode MS;">{{#switch: {{{1}}}
+
#REDIRECT [[Template:Music]]
| flat = &#x266d;
 
| natural = &#x266e;
 
| sharp = &#x266f;
 
| double sharp = [[Image:DoubleSharp.svg|8px]]
 
| double flat = [[Image:DoubleFlat.svg|8px]]
 
| #default = {{{1}}}
 
}}</span><noinclude>
 
 
 
<!--Hopefully the inline style attribute will be replace by a class reference to "accidental" in [[MediaWiki:Common.css]]-->
 
 
 
==Purpose==
 
The template correctly renders Unicode sharps ({{accidental|sharp}}) flats ({{accidental|flat}}) and natural signs ({{accidental|natural}}) in [[Internet Explorer]] which would show empty squares instead of the proper symbol. The idea is modeled after [[Template:IPA]]. The choice of fonts also improves the rendering in other browsers such as [[Mozilla Firefox]].
 
 
 
{| cellspacing="14"
 
! !! Without template !! With template
 
|-
 
! Flat
 
| &#x266d; || {{accidental|&#x266d;}}
 
|-
 
! Natural
 
| &#x266e; || {{accidental|&#x266e;}}
 
|-
 
! Sharp
 
| &#x266f; || {{accidental|&#x266f;}}
 
|}
 
 
 
==Examples==
 
===Flat sign===
 
<nowiki>{{accidental|flat}}</nowiki> renders {{accidental|flat}}<br/>
 
<nowiki>{{accidental|double flat}}</nowiki> renders {{accidental|double flat}}
 
 
 
===Natural sign===
 
<nowiki>{{accidental|natural}}</nowiki> renders {{accidental|natural}}
 
 
 
===Sharp sign===
 
<nowiki>{{accidental|sharp}}</nowiki> renders {{accidental|sharp}}<br/>
 
<nowiki>{{accidental|double sharp}}</nowiki> renders {{accidental|double sharp}}
 
</noinclude>
 

Latest revision as of 16:25, 16 October 2020

Redirect to: