Template:Code: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Undo revision 275898 by 1416006136 (talk))
Tag: Undo
m (Added working backwards compatibility.)
Line 4: Line 4:
|desaturated=<code style="background-color: rgb(0,0,0,.16); border-radius: 4px; padding: 2px 3px; user-select:{{#switch:{{{select}}}|#default=text|1=all|2=none}};">{{{2|}}}</code>
|desaturated=<code style="background-color: rgb(0,0,0,.16); border-radius: 4px; padding: 2px 3px; user-select:{{#switch:{{{select}}}|#default=text|1=all|2=none}};">{{{2|}}}</code>
|outlined=<code style="background-color: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.1); border-radius: 4px; padding: 1px 3px; user-select:{{#switch:{{{select}}}|#default=text|1=all|2=none}};">{{{2|}}}</code>
|outlined=<code style="background-color: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.1); border-radius: 4px; padding: 1px 3px; user-select:{{#switch:{{{select}}}|#default=text|1=all|2=none}};">{{{2|}}}</code>
|clear=<code style="color: {{{color|#B9B7B5}}};">{{{2|}}}</code>}}</includeonly></onlyinclude>{{doc}}
|clear=<kbd style="color:{{{color|currentcolor}}};user-select:{{#switch:{{{select}}}|#default=text|1=all|2=none}};">{{{2|}}}</kbd><!--
 
 
===The following options are required for backward compatibility. Delete when these outdated options are replaced with new ones on most pages.===
 
 
-->|desaturated-oneclick=<code title="outdated usage of “desaturated-oneclick”. Use “desaturated&#124;select=1” instead" style="border-left:4px solid red;background-color:rgb(0,0,0,.16);border-radius:4px;padding:2px 3px;user-select:all;">{{{2|}}}</code>
|outline=<code title="outdated usage of “outline”. Use “outlined” instead" style="background-color: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.1); border-radius: 4px; padding: 1px 3px; border-left:4px solid red;">{{{2|}}}</code>
|outline-oneclick=<code title="outdated usage of “outline-oneclick”. Use “outlined&#124;select=1” instead" style="background-color:rgba(0,0,0,.16);border:1px solid rgba(255,255,255,.1);border-radius:4px;padding:1px 3px;border-left:4px solid red;user-select:all;">{{{2|}}}</code>
|oneclick=<code title="outdated usage of “oneclick”. Use “select=1” instead" style="background-color:rgb(0,0,0,.35);border-radius:4px;padding:2px 3px;user-select:all;border-left:4px solid red;">{{{2|}}}</code>
}}</includeonly></onlyinclude>{{doc}}

Revision as of 07:12, 22 January 2023

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Curly brackets white.pngTemplate Documentation [view] [edit]
Icon-translate.png Available doc translations
Page history

This template will allow you to format text as a one-line code.

Usage

This template prefers inline formatting of parameters
Parameters Description Preview
| <Text>
| 1 = <Text>
The text that will be displayed. Can contain links, templates and raw html, except when the {{{lang}}} parameter is used. Hello, World!
| lang = <Option> Adds syntax highlighting for the language specified using syntaxhighlight tag with inline attribute.
List of Supported languages.
int main() { return 0; }
| style = <CSS> CSS styles. Note that some styles require !important to be specified. Colored text

See Also