Template:Code: Difference between revisions
Jump to navigation
Jump to search
(Revamp: use {{{preset}}} for style presets instead of {{{style}}}; {{{style}}} now specifies CSS like other templates; use <syntaxhighlight> instead of <code> for parity with wp:Template:Code; add alias {{{background}}} for {{{bg}}}) |
m (The last change hurt the wiki) |
||
Line 1: | Line 1: | ||
< | {{Doc}} | ||
<includeonly><onlyinclude><code style="border-radius:3px; color:{{{color|currentcolor}}}; user-select:{{#switch:{{{select|}}}|#default=text|0=none|1=all}}; background-color:{{#switch:{{{style}}} | |||
|#default = {{{bg|rgb(0,0,0,.35)}}}; padding:2px 3px">{{{1|}}} | |||
|1 = {{{bg|rgba(0,0,0,.16)}}}; border:1px solid rgba(255,255,255,.1); padding:1px 3px">{{{1|}}} | |||
|2 = {{{bg|rgba(0,0,0,.16)}}}; padding:2px 3px">{{{1|}}} | |||
|3 = {{{bg|initial}}}">{{{1|}}} | |||
|4 = {{{bg|rgba(255,255,255,.05)}}}; border:1px solid rgba(255,255,255,.1); padding:1px 3px">{{{1|}}} | |||
}}<span style="user-select:none"></span></code></onlyinclude></includeonly> | |||
Revision as of 08:25, 29 April 2023
The above documentation is transcluded from Template:Code/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.