Template:VerticalGrid/doc

From Rhythm Heaven Wiki
< Template:VerticalGrid
Revision as of 11:21, 21 September 2025 by HyperNervie (talk | contribs) (Created page with "== Template:VerticalGrid == {{shortcut|template=1|vg}} Template:VerticalGrid creates a grid where cells are filled vertically. This helps with the typesetting of reading materials and lyrics where many languages are put together. If presenting these things in a table, selecting text in a single column across rows also selects text from other columns, which is annoying when readers want to copy text in one language; on narrow devices, such contents are usually squeezed an...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Template:VerticalGrid

Shortcut

Template:VerticalGrid creates a grid where cells are filled vertically. This helps with the typesetting of reading materials and lyrics where many languages are put together. If presenting these things in a table, selecting text in a single column across rows also selects text from other columns, which is annoying when readers want to copy text in one language; on narrow devices, such contents are usually squeezed and make trouble for mobile viewers. By using this template properly, these problems can be addressed.

Parameters:

  • {{{1}}}: Cells of the grid. Use {{VerticalGridCell}} to create cells.
  • {{{nowrap}}}:
    • If given any non-empty string, the grid is adjusted to the minimum width such that contents within each cell don't auto wrap. A horizontal scrollbar is enabled when the width exceeds full width. Usually you need this for lyrics.
    • Otherwise, the grid takes up full width. Each column takes up equal width within the grid. Usually you need this for reading materials.
  • {{{column-gap}}}: Gap width between columns. 2em by default.
  • {{{align-items}}}: Vertical alignment of contents within each cell. See MDN docs for all possible values.

Template:VerticalGridCell

Shortcut

Template:VerticalGridCell creates a cell that adds to a grid created with {{VerticalGrid}}.

Parameters:

  • {{{1}}}: Content of the cell.
  • {{{poem}}}: If given, replace the content with the output of passing this argument to {{Poem}}. (So that you don't need to transclude {{Poem}} yourself.)
  • {{{column}}}: Column number starting from 1. To span across several columns (assume the cell is in column x and you want it to span across y columns so that the next column is z=x+y), fill x/z or x/span y.
  • {{{row}}}: Usually the cell is placed below cells before it that take up the same column, so the row number is automatic. If the cell spans across several rows (assume x rows), fill span x; otherwise, omit this argument.

Examples

(To be added)