Difference between revisions of "Template talk:Button"
m (Correction of parser functions pre-requisite statement.) |
(Enabled linear-gradient parameters) |
||
Line 16: | Line 16: | ||
On the other hand, the following parameters have been dropped with this initial version of the template: | On the other hand, the following parameters have been dropped with this initial version of the template: | ||
* <code>bgcolor1</code>, <code>bgcolor2</code> : Button background gradient colours. Originally, they were passed to another template, Linear-gradient. Because it's omitted now, these colours are now hard-coded at the defaults: <kbd>#FCFCFC</kbd> and <kbd>#E0E0E0</kbd>, respectively. | * <strike><code>bgcolor1</code>, <code>bgcolor2</code> : Button background gradient colours. Originally, they were passed to another template, Linear-gradient. Because it's omitted now, these colours are now hard-coded at the defaults: <kbd>#FCFCFC</kbd> and <kbd>#E0E0E0</kbd>, respectively.</strike> | ||
* <code>format</code> : It was bold text toggle. Instead, please use the <kbd>style</kbd> parameter as indicated earlier. | * <code>format</code> : It was bold text toggle. Instead, please use the <kbd>style</kbd> parameter as indicated earlier. | ||
--[[User:FPR|FPR]] ([[User talk:FPR|talk]]) 21:00, 6 September 2020 (UTC) | --[[User:FPR|FPR]] ([[User talk:FPR|talk]]) 21:00, 6 September 2020 (UTC) | ||
---- | |||
Two parameters where enabled to control the top-to-bottom linear gradient colours, of the button background: | |||
* <code>LGtopcolor</code> : Gradient top, beginning colour; | |||
* <code>LGbtmcolor</code> : Gradient bottom, end colour. | |||
Those two are passed to the template directly, without nesting any other templates. Renamed the original parameters for more convenience. | |||
--[[User:FPR|FPR]] ([[User talk:FPR|talk]]) 18:15, 9 September 2020 (UTC) |
Latest revision as of 14:17, 9 September 2020
This template was copied off MediaWiki's sandbox. The following link overviews the template usage: [1]
It's been tweaked a bit to rid it of:
- a defunct parser function '#ifeq'; due to missing/disabled required MediaWiki Extention (at the time of editing the template); and
- calling another template; i.e., Linear-gradient, which in turn invokes a defunct parser function '#switch'.
The text styling parameter this '#ifeq' controls can still be passed via another available parameter; namely, 'style'. With the latter, one or more additional CSS properties and values can be passed, separated by semicolons, as well as must end with one (e.g. style=font-weight:bold;text-align:center;). Please, note that the double quotation marks are deliberately left out -- they should not be used in this style parameter.
The parameters this tweaked templates accepts are:
text
: Button text;padTB
: Top and Bottom padding (a number along with the unit);padLR
: Left and Right padding (a number along with the unit);bgcolor
: Button background colour; usually, in hexadecimal format, or any that accepted in inline styling;fgcolor
: Button text font colour; andstyle
: Any additional inline styling properties along with their values.
On the other hand, the following parameters have been dropped with this initial version of the template:
bgcolor1
,bgcolor2
: Button background gradient colours. Originally, they were passed to another template, Linear-gradient. Because it's omitted now, these colours are now hard-coded at the defaults: #FCFCFC and #E0E0E0, respectively.format
: It was bold text toggle. Instead, please use the style parameter as indicated earlier.
--FPR (talk) 21:00, 6 September 2020 (UTC)
Two parameters where enabled to control the top-to-bottom linear gradient colours, of the button background:
LGtopcolor
: Gradient top, beginning colour;LGbtmcolor
: Gradient bottom, end colour.
Those two are passed to the template directly, without nesting any other templates. Renamed the original parameters for more convenience.