Difference between revisions of "Template talk:Button"

From Rizon Wiki
Jump to navigation Jump to search
(Notes on usage, reference and outlining accepted parameters.)
 
(Enabled linear-gradient parameters)
 
(2 intermediate revisions by the same user not shown)
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 [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 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 additonal inline styling properties.
* <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.
* <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>
* '''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)
 
----
 
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:

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)


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.

--FPR (talk) 18:15, 9 September 2020 (UTC)