Template:ScrollBox/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 4: Line 4:


=== Parameters ===
=== Parameters ===
* {{param|1}} - The text inside the ScrollBox.
* {{Param}} The text inside the ScrollBox.
* {{param|title}} - The title above the scroll box. Leave empty for no title.
* {{Param|title}} The title above the scroll box. Leave empty for no title.
* {{param|bottom-border}} - If set to a non-empty value, then a short, thin line will be present at the bottom. Use if the scrollbar becomes unreliable from long lists.
* {{Param|bottom-border}} If set to a non-empty value, then a short, thin line will be present at the bottom. Use if the scrollbar becomes unreliable from long lists.
* {{param|noscroll}} - If set to a non-zero value, scrolling is disabled. Use if scrolling becomes problematic on nested ScrollBoxes.
* {{Param|noscroll}} If set to a non-zero value, scrolling is disabled. Use if scrolling becomes problematic on nested ScrollBoxes.
* {{param|maxheight}} - Change the height threshold for when the ScrollBox should be active. This isn't for things such as KV or I/O lists, as ideally these should use the default to maintain a consistency.
* {{Param|maxheight}} Change the height threshold for when the ScrollBox should be active. This isn't for things such as KV or I/O lists, as ideally these should use the default to maintain a consistency.
* {{param|color}} - Sets the background color of the ScrollBox.
* {{Param|color}} Sets the background color of the ScrollBox.
* {{param|border-color}} - Sets the color of the border of the ScrollBox.
* {{Param|border-color}} Sets the color of the border of the ScrollBox.
* {{param|style}} - Allows the editor to throw in any other style attributes to the ScrollBox.
* {{Param|style}} Allows the editor to throw in any other style attributes to the ScrollBox.


=== Examples ===
=== Examples ===
<!-- Use 'wikitable' instead, or 'bottom-border' is invisible. Bonus for looking nice too -->
<!-- Use 'wikitable' instead, or 'bottom-border' is invisible. Bonus for looking nice too -->
{| class="wikitable" style="width:100%; table-layout:fixed;"
{| class="wikitable" style="width:100%; table-layout:fixed"
! style="width:50%;" | Wikitext
! style="width:50%" | Wikitext
! style="width:50%;" | Result
! style="width:50%" | Result
|-
|-
| <pre style="width:80%;margin:auto auto;">{{ScrollBox| maxheight=8em|
| <pre style="width:80%; margin:auto auto">{{ScrollBox|maxheight=8em|
# One
# One
# Two
# Two
Line 31: Line 31:
# Ten
# Ten
}}</pre>
}}</pre>
| {{ScrollBox| maxheight=8em|
| {{ScrollBox|maxheight=8em|
# One
# One
# Two
# Two
Line 44: Line 44:
}}
}}
|-
|-
| <pre style="width:80%;margin:auto auto;">{{ScrollBox| maxheight=8em | bottom-border=1|
| <pre style="width:80%; margin:auto auto">{{ScrollBox|maxheight=8em|bottom-border=1|
# One
# One
# Two
# Two
Line 56: Line 56:
# Ten
# Ten
}}</pre>
}}</pre>
| {{ScrollBox| maxheight=8em | bottom-border=1|
| {{ScrollBox|maxheight=8em|bottom-border=1|
# One
# One
# Two
# Two
Line 69: Line 69:
}}
}}
|-
|-
| <pre style="width:80%;margin:auto auto;">{{ScrollBox| maxheight=8em | bottom-border=1 | noscroll=1|
| <pre style="width:80%; margin:auto auto">{{ScrollBox|maxheight=8em|bottom-border=1|noscroll=1|
# One
# One
# Two
# Two
Line 81: Line 81:
# Ten
# Ten
}}</pre>
}}</pre>
| {{ScrollBox| maxheight=8em | bottom-border=1 | noscroll=1|
| {{ScrollBox|maxheight=8em|bottom-border=1|noscroll=1|
# One
# One
# Two
# Two
Line 94: Line 94:
}}
}}
|-
|-
| <pre style="width:80%;margin:auto auto;">{{ScrollBox| maxheight=8em | bottom-border=1 | noscroll=0|
| <pre style="width:80%; margin:auto auto">{{ScrollBox|maxheight=8em|bottom-border=1|noscroll=0|
# One
# One
# Two
# Two
Line 106: Line 106:
# Ten
# Ten
}}</pre>
}}</pre>
| {{ScrollBox| maxheight=8em | bottom-border=1 | noscroll=0|
| {{ScrollBox|maxheight=8em|bottom-border=1|noscroll=0|
# One
# One
# Two
# Two
Line 119: Line 119:
}}
}}
|-
|-
| <pre style="width:80%;margin:auto auto;">{{ScrollBox| maxheight=8em | color=#234 | border-color=#456 | style=border-left:10px solid #fc6|
| <pre style="width:80%; margin:auto auto">{{ScrollBox|maxheight=8em|color=#234|border-color=#456|style=border-left:10px solid #FC6|
# One
# One
# Two
# Two
Line 131: Line 131:
# Ten
# Ten
}}</pre>
}}</pre>
| {{ScrollBox| maxheight=8em | color=#234 | border-color=#456 | style=border-left:10px solid #fc6|l=1|
| {{ScrollBox|maxheight=8em|color=#234|border-color=#456|style=border-left:10px solid #FC6|l=1|
# One
# One
# Two
# Two

Revision as of 11:44, 29 April 2023

Edit-copy.png
This is a documentation subpage for Template:ScrollBox.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Use this to rein in lists such as KV, Input and Ouput lists on entity pages. Reaaally long lists won'tnot flood the entire page this way.

Parameters

  • {{{1}}} – The text inside the ScrollBox.
  • {{{title}}} – The title above the scroll box. Leave empty for no title.
  • {{{bottom-border}}} – If set to a non-empty value, then a short, thin line will be present at the bottom. Use if the scrollbar becomes unreliable from long lists.
  • {{{noscroll}}} – If set to a non-zero value, scrolling is disabled. Use if scrolling becomes problematic on nested ScrollBoxes.
  • {{{maxheight}}} – Change the height threshold for when the ScrollBox should be active. This isn't for things such as KV or I/O lists, as ideally these should use the default to maintain a consistency.
  • {{{color}}} – Sets the background color of the ScrollBox.
  • {{{border-color}}} – Sets the color of the border of the ScrollBox.
  • {{{style}}} – Allows the editor to throw in any other style attributes to the ScrollBox.

Examples

Wikitext Result
{{ScrollBox|maxheight=8em|
# One
# Two
# Three
# Four
# Five
# Six
# Seven
# Eight
# Nine
# Ten
}}
  1. One
  2. Two
  3. Three
  4. Four
  5. Five
  6. Six
  7. Seven
  8. Eight
  9. Nine
  10. Ten
{{ScrollBox|maxheight=8em|bottom-border=1|
# One
# Two
# Three
# Four
# Five
# Six
# Seven
# Eight
# Nine
# Ten
}}
  1. One
  2. Two
  3. Three
  4. Four
  5. Five
  6. Six
  7. Seven
  8. Eight
  9. Nine
  10. Ten
{{ScrollBox|maxheight=8em|bottom-border=1|noscroll=1|
# One
# Two
# Three
# Four
# Five
# Six
# Seven
# Eight
# Nine
# Ten
}}
  1. One
  2. Two
  3. Three
  4. Four
  5. Five
  6. Six
  7. Seven
  8. Eight
  9. Nine
  10. Ten
{{ScrollBox|maxheight=8em|bottom-border=1|noscroll=0|
# One
# Two
# Three
# Four
# Five
# Six
# Seven
# Eight
# Nine
# Ten
}}
  1. One
  2. Two
  3. Three
  4. Four
  5. Five
  6. Six
  7. Seven
  8. Eight
  9. Nine
  10. Ten
{{ScrollBox|maxheight=8em|color=#234|border-color=#456|style=border-left:10px solid #FC6|
# One
# Two
# Three
# Four
# Five
# Six
# Seven
# Eight
# Nine
# Ten
}}
  1. One
  2. Two
  3. Three
  4. Four
  5. Five
  6. Six
  7. Seven
  8. Eight
  9. Nine
  10. Ten