Jump to content

Template:Nbsp: Difference between revisions

docs: fixed an oopsie, linked to other related template
(Created page with "<includeonly> </includeonly><noinclude> The '''non-breaking space''' template places a special character in the text indicating that a space should be placed here but that it should not be possible to break the line on said space. This is useful when you don't want some text to be treated as separate words, such as the terms making up a short BSL command in a paragraph. This block of text should wrap awkwardly on your screen due to the use of slashes: {{FontCol|gre...")
 
(docs: fixed an oopsie, linked to other related template)
 
Line 1: Line 1:
<includeonly>&nbsp;</includeonly><noinclude>
<includeonly>&nbsp;</includeonly><noinclude>
The '''non-breaking space''' template places a special character in the text indicating that a space should be placed here but that it should not be possible to break the line on said space. This is useful when you don't want some text to be treated as separate words, such as the terms making up a short BSL command in a paragraph. This block of text should wrap awkwardly on your screen due to the use of slashes:
The '''non-breaking space''' template places a special character in the text indicating that a space should be placed here but that it should not be possible to break the line on said space. This is useful when you don't want some text to be treated as separate words, such as the terms making up a short BSL command in a paragraph. This block of text should wrap awkwardly on your screen due to the presence of spaces in the command:


{{FontCol|green|Let's say you're interested in Konoko's unused tower-cleared line. For lines like this one, listed as UNUSED, you can play them if you enter <code>chr_talk 0 ''OSBD_name''</code> in the developer console.}}
{{FontCol|green|Let's say you're interested in Konoko's unused tower-cleared line. For lines like this one, listed as UNUSED, you can play them if you enter <code>chr_talk 0 ''OSBD_name''</code> in the developer console.}}
Line 8: Line 8:
{{FontCol|green|Let's say you're interested in Konoko's unused tower-cleared line. For lines like this one, listed as UNUSED, you can play them if you enter <code>chr_talk{{nbsp}}0{{nbsp}}''OSBD_name''</code> in the developer console.}}
{{FontCol|green|Let's say you're interested in Konoko's unused tower-cleared line. For lines like this one, listed as UNUSED, you can play them if you enter <code>chr_talk{{nbsp}}0{{nbsp}}''OSBD_name''</code> in the developer console.}}


This template can also be used to force multiple sequential spaces to be rendered as such; normally the HTML standard dictates that multiple spaces are treated as a single space. But this template should not be used in large quantities to force-align blocks of content, as there are smarter ways to do this using MediaWiki table markup, CSS <tt>margin</tt> and <tt>text-align</tt> directives, etc.
This template can also be used to force multiple sequential spaces to be rendered as such; normally the HTML standard dictates that multiple spaces are treated as a single space. But this should not be used in large quantities to force-align blocks of content, as there are smarter ways to do this using MediaWiki table markup, CSS <tt>margin</tt> and <tt>text-align</tt> directives, etc.


To accomplish the opposite – to ''encourage'' the browser to render a linebreak in the midst of some text – see [[Template:Sbrk]].
==Related templates==
To prevent a linebreak from happening after a hyphen, you need the [[Template:Nbhy|non-breaking hyphen]].
 
To accomplish the opposite of this template – to ''encourage'' the browser to render a linebreak in the midst of some text, use the [[Template:Sbrk|soft break template]].


[[Category:Macro templates]]</noinclude>
[[Category:Macro templates]]</noinclude>