Template:Brace border/doc

From Wikisource
Jump to navigation Jump to search

Usage[edit]

Create a box with "brace borders"

  • side: one of left, right, lr, top, bottom, tb
  • outside: outset the border so the contents is inline with neighbouring content.
  • shrink: Shrink to fit content as inline block element (optional - by default fills horizontal space)

Example

{{brace border|side=lr|shrink=y|Some content}}
{{brace border|side=right|shrink=y|Some content}}
{{brace border|side=top|shrink=y|Some content}}

Some content

Some content

Some content

Example: Use of outside parameter

You can use some padding on the containing element to give the border a space to "spill" into:

{| class="wikitable"
| style="padding-left:10px;" | Some content
|-
| style="padding-left:10px;" | {{brace border|side=lr|Content is inset by border width}}
|-
| style="padding-left:10px;" | {{brace border|side=lr|outside=y|Same left margin as top cell}}
|}
Some content

Content is inset by border width

Same left margin as top cell

Notes[edit]

  • The border width is 10px.
  • This will not export properly until phab:T256780 is resolved (but then neither will {{brace2}} until phab:T270589 is resolved)

See also[edit]