Difference between revisions of "Template talk:Button"

From Rizon Wiki
Jump to navigation Jump to search
m (Typos, and added link to Parser functions manual article.)
m (Correction of parser functions pre-requisite statement.)
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 [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
* a defunct [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Parser_functions parser function] '#ifeq'; due to missing/disabled required [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:ParserFunctions MediaWiki Extention] (at the time of editing the template); and
* 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'.
* 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. <kbd>style=font-weight:bold;text-align:center;</kbd>). 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:
The parameters this tweaked templates accepts are:
* '''text''': Button text;
* <code>text</code> : Button text;
* '''padTB''': Top and Bottom padding (a number along with the unit);
* <code>padTB</code> : Top and Bottom padding (a number along with the unit);
* '''padLR''': Left and Right padding (a number along with the unit);
* <code>padLR</code> : 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;
* <code>bgcolor</code> : Button background colour; usually, in hexadecimal format, or any that accepted in inline styling;
* '''fgcolor''': Button text font colour; and
* <code>fgcolor</code> : Button text font colour; and
* '''style''': Any additional inline styling properties along with their values.
* <code>style</code> : 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:
* '''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.
* <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.
* '''format''': It was a toggle to render the button text in bold face. Instead, please use the '''style''' 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)

Revision as of 15:15, 7 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:

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 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)