Difference between revisions of "Template talk:Button"
Jump to navigation
Jump to search
(Notes on usage, reference and outlining accepted parameters.) |
m (Typos, and added link to Parser functions manual article.) |
||
Line 2: | Line 2: | ||
It's been tweaked a bit to rid it of: | It's been tweaked a bit to rid it of: | ||
* a defunct parser function 'ifeq'; due to missing/disabled required scripting language (at the time of editing the template); and | * a defunct [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Parser_functions parser function] 'ifeq'; due to missing/disabled required scripting language (at the time of editing the template); and | ||
* calling another template; i.e., Linear-gradient, which in turn invokes a defunct parser function 'switch'. | * calling another template; i.e., Linear-gradient, which in turn invokes a defunct [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Parser_functions 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 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. | ||
Line 13: | Line 13: | ||
* '''bgcolor''': Button background colour; usually, in hexadecimal format, or any that accepted in inline styling; | * '''bgcolor''': Button background colour; usually, in hexadecimal format, or any that accepted in inline styling; | ||
* '''fgcolor''': Button text font colour; and | * '''fgcolor''': Button text font colour; and | ||
* '''style''': Any | * '''style''': 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: | On the other hand, the following parameters have been dropped with this initial version of the template: |
Revision as of 17:05, 6 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 scripting language (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; and
- style: 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 with the default ones: #FCFCFC and #E0E0E0, respectively.
- format: It was a toggle to render the button text in bold face. Instead, please use the style parameter as indicated earlier.