Template:Paired list grid

From Dragon Quest Wiki
Revision as of 17:11, 29 April 2025 by Rigel Kent (talk | contribs) (add label and label id parameters)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Displays a grid containing key-value pairs.

The grid's width is split into 1/12ths, so 12 "span" values fill the width. Default span value is 3 — 3/12ths or 1/4th of the width.

Mimics a table layout, but avoids certain SEO and accessibility issues, especially mixed-up reading order, with using a table for this layout.

Example[edit]

{{paired list grid
 | label = Stats
 | label id = stats
 | key background color = lightblue
 | border color = darkblue
 | span 1  = 4
 | key 1   = Level
 | value 1 = 10
 | span 2  = 4
 | key 2   = HP
 | value 2 = 100
 | span 3  = 4
 | key 3   = MP
 | value 3 = 10
 | key 4   = Attack
 | value 4 = 100
 | key 5   = Defence
 | value 5 = 100
 | key 6   = Agility
 | value 6 = 100
 | key 7   = Luck
 | value 7 = 100
}}
Stats
Level
10
HP
100
MP
10
Attack
100
Defence
100
Agility
100
Luck
100

Appearance in narrow viewports:

Stats
Level
10
HP
100
MP
10
Attack
100
Defence
100
Agility
100
Luck
100