Template talk:VP

From DominionStrategy Wiki
Jump to: navigation, search

Contents

[edit] Template Rework

This template has some problems in styling and usabilty that shall be fixed.

[edit] Problems

[edit] Scaled variants

Scaled variants of the template don't match their correponding scaled variants of the $ icon.

  • That results in weird looking instances where both icons are displayed close to each other (e.g. Harem).
  • The problem was fixed for all instances in version tables with a rather verbose form: <span style="font-family:Times New Roman; font-size:250%;">'''2'''[[File:VP.png|27px|bottom]]</span>
  • The problem wasn't fixed for instances inside infoboxes.

[edit] Line breaking

If you don't handle it explicitly it is possible that browser display a line break between amount and the icon (depending on available space).

  • This isn't optimal for the reader.
  • The problem is sometimes fixed with Template:nowrap (e.g. {{nowrap|2{{VP}}}}), but not consistently.

[edit] Spacing between amount and icon

Spacing between amount and icon doesn't match exactly the spacing of the original cards.

[edit] Proposed solution

[edit] Usage

The recommended usage of the template is changed to use amount per default. That way all problems from above can be handled internally and editors don't have to care.

  • If size is omitted it is considered to be displayed inline with text. In that case amount is styled like the text around it and the editor has to take care of differing font weight if needed (e.g. {{VP|'''2'''}} for bold).
  • If size is given it is considered to be displayed separately from text (e.g. Harem). In that case an editor only has to write e.g. {{VP|2|l}} and all styling (font family, font size, font style, font weight) is done by the template to match the corresponding $ icon.
  • Independet of size the template ensures a non-breaking behavior and a correct spacing between amount and icon.

[edit] Implementation

  • The base for the scaled variants are the determined scaling factors of the fix for version tables. Those instances can be replaced by this template after the rework.
  • All changes are implemented in a backwards compatible way. This means that all different usage forms of this template that already exist throughout the wiki will still work (see Template:VP/doc#Backwards compatibility for different usage forms). Therefore existing usages can but don't have to be updated.

TaDe (talk) 12:23, 21 August 2022 (EDT)
Edited: TaDe (talk) 16:03, 22 August 2022 (EDT)

Personal tools
Namespaces

Variants
Views
Actions
Navigation
Toolbox