Template:Br
Purpose and Usage
This template provides a means to specify a custom line break height.
You only need to pass an argument for a parameter b (which stands for the # of breaks).
b cannot (currently) be a decimal between -1 and 1 on speedsolving wiki. (The wiki will round it off.) It can also be a negative value (again, as long as it's < -1).
Furthermore, to have x line breaks, you need to pass x - 1 for b (with the exception that if we want exactly 1 line break, we pass -1). Since that's the case, you can technically have a decimal (between 0 and 1) of a line break. For example, if you want to only break 0.5 of a line break, you would pass -1.5 for b. If you want to have exactly 1 line break, you would pass -1 for b.
This template may seem redundant, but should a wiki page (or a portion of it) be written in HTML, vertical spacing will not be picked up (and thus you would need to manually type br's to space out lines). But again, as mentioned already, you can have decimal vertical spaces (which can come in handy when spacing out headings, etc.).
This also may seem redundant for those who code a wiki page in HTML, due to the fact that the code is so simple, but this template functions as function (factors out code ... and therefore reduces page size).
Line break height (in this template) is calculated by the em (font size...the font height from the top of letters like 'h' to the bottom of the letters like 'g') unit of measure, as pixels (px) is not very inheritable (due to internet browsers having different display settings, etc.). Therefore, because this template uses em, it naturally inherits the formatting of the page (more precisely, the specific code block) that it's placed in.
Example 1
If we want to have a line break that is 1 line break in between lines "Line 2" and "Line 3", we pass -1 for b.
Line 1
Line 2
{{br|b=-1}}
Line 3
Output:
Line 1
Line 2
Line 3
Example 2
If we want to have a line break that is equivalent to 3.5 line breaks in between lines "Line 2" and "Line 3", we pass 2.5 for b.
Line 1
Line 2
{{br|b=2.5}}
Line 3
Output:
Line 1
Line 2
Line 3
Example 3
If we want to have a line break that is 0.5 line breaks in between lines "Line 2" and "Line 3", we pass -1.5 for b. (Having fractional line breaks can be desirable when you have consecutive text boxes that you want to be "touching"/stacked on top of each other.)
Line 1
Line 2
{{br|b=-1.5}}
Line 3
Output:
Line 1
Line 2
Line 3
