Template:Bullwrap

From The Infosphere, the Futurama Wiki
Jump to: navigation, search
Documentation for {{bullwrap}}

Use

{{nowrap-begin}} and {{nowrap-end}} capsules a piece of text where certain characters should not be wrapped around. This is useful for certain strings of items which are separated by certain characters, such as a bullet (•), where you do not want the bullet at the end of a line to go down to the following line because of different screen resolutions.

Wrap templates

The following templates are to be used within these begin and end templates, and they indicate precisely where the wraps in the line may occur. Remember, first the character appears, and then the allowed wrap.

  • {{wrap}} - a regular wrap, no character.
  • {{bullwrap}} or {{•wrap}} or {{•w}} - a bullet (&bull) followed by a wrap.

Usage

Consider the following list:

1 • 2 • 3 • 4 • 5

Depending on your browser size, it could at times be rendered like this:

1 • 2 • 3
• 4 • 5

Which is not exactly pretty. We would rather prefer that it could only be rendered like this (in case of a breaking between 3 and 4):

1 • 2 • 3 •
4 • 5

To accomplish this, without any fiddling, we wrap the text around our nowrappers and then we put a bullet wrap instead of a bullet, like this:

{{nowrap-begin}} 1 {{•w}} 2 {{•w}} 3 {{•w}} 4 {{•w}} 5 {{nowrap-end}}

Result:

1  • 2  • 3  • 4  • 5

You may want to resize your browser manually to see the effects (the other examples were 'hardcoded').