Difference between revisions of "Template:Messagebox"

From Savage Game Design Wiki
Jump to navigation Jump to search
m (Add border-radius, box-shadow and margin)
m (Fix default value)
 
Line 9: Line 9:
 
* message: the message to display
 
* message: the message to display
 
* icon: (Optional, default "i") symbol to the left, a letter (written in white) or an image (format <nowiki>[[File]]</nowiki>)
 
* icon: (Optional, default "i") symbol to the left, a letter (written in white) or an image (format <nowiki>[[File]]</nowiki>)
* colour: (Optional, default #025D00) box HTML colour, can be one of:
+
* colour: (Optional, default #380) box HTML colour, can be one of:
 
** HTML colour name - ''red'', ''darkgrey'', etc.
 
** HTML colour name - ''red'', ''darkgrey'', etc.
 
** HTML colour format - '''#RGB''' or '''#RRGGBB'''
 
** HTML colour format - '''#RGB''' or '''#RRGGBB'''

Latest revision as of 20:14, 10 February 2020

Displays a standardised message box.

Usage

{{Messagebox|message|icon|colour}}

  • message: the message to display
  • icon: (Optional, default "i") symbol to the left, a letter (written in white) or an image (format [[File]])
  • colour: (Optional, default #380) box HTML colour, can be one of:
    • HTML colour name - red, darkgrey, etc.
    • HTML colour format - #RGB or #RRGGBB
    • rgb format - rgb(255, 0, 0)
    • rgba format - rgba(255, 0, 0, 0.5)
    • hsl format - hsl(120, 100%, 50%)
    • hsla format - hsla(120, 60%, 70%, 0.3)


Examples
Code Result
{{Messagebox}}
i
-Text not defined-
{{Messagebox|Hello there!}}
i
Hello there!
{{Messagebox|Hello there!|✔}}
Hello there!
{{Messagebox|Hello there!|✔|orange}}
Hello there!
{{Messagebox|Hello there!|✔|#CDF}}
Hello there!
{{Messagebox|Yep|Unreadable!|#EEE}}
Unreadable!
Yep