Template:CodeBlock: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
__NOEDITSECTION__ | {{Doc}}__NOEDITSECTION__ | ||
<includeonly><onlyinclude><div style="overflow:hidden;background-color:{{#switch:{{{style|}}}|1=rgba(0,0,0,.1)|rgba(0,0,0,.3)}};{{#switch:{{{style|}}}|1=border:1px solid rgba(48,48,48,1);|}}border-radius:4px; font-family:monospace,monospace; line-height:1.125rem; text-indent:0; white-space:pre-wrap; margin: {{{margin|.3em 0 .3em 0}}}"><!-- | |||
-->{{#if:{{{src|{{{lang|}}}}}}|<div style="display:flex;justify-content:space-between;background-color:rgba(0,0,0,.1); border-bottom:1px solid rgba(255,255,255,.1); font-family:monospace,monospace;line-height:1.125rem; text-indent:0; white-space:pre-wrap; padding:.5em"><!-- | -->{{#if:{{{src|{{{lang|}}}}}}|<div style="display:flex;justify-content:space-between;background-color:rgba(0,0,0,.1); border-bottom:1px solid rgba(255,255,255,.1); font-family:monospace,monospace;line-height:1.125rem; text-indent:0; white-space:pre-wrap; padding:.5em"><!-- | ||
--><div>{{{src|The source was not specified}}}<span style=user-select:none></span></div><!-- | --><div>{{{src|The source was not specified}}}<span style=user-select:none></span></div><!-- | ||
Line 9: | Line 9: | ||
--><div style="width:100%;text-indent:0;line-height:1.6em;white-space:{{#if:{{{softwrap|}}}|pre-wrap|pre}};height:100%;tab-size:4;">{{#if:{{{lightamount1|{{{lightstart1|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart1|1}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount1|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount2|{{{lightstart2|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart2|2}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount2|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount3|{{{lightstart3|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart3|3}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount3|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount4|{{{lightstart4|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart4|4}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount4|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}<div style="padding:.45em .5em;position:relative">{{{1|}}}<span style=user-select:none></span></div></div><!-- | --><div style="width:100%;text-indent:0;line-height:1.6em;white-space:{{#if:{{{softwrap|}}}|pre-wrap|pre}};height:100%;tab-size:4;">{{#if:{{{lightamount1|{{{lightstart1|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart1|1}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount1|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount2|{{{lightstart2|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart2|2}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount2|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount3|{{{lightstart3|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart3|3}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount3|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}{{#if:{{{lightamount4|{{{lightstart4|}}}}}}|<div style="position:sticky;z-index:0"><div style="width:100%;background:rgba(255,128,0,0.1);margin-top:calc((1.6em * ({{{lightstart4|4}}} - 1)) + .45em);margin-bottom:.45em;height:calc(1.6em * {{{lightamount4|1}}});position:absolute;left:0;user-select:none;pointer-events:none"></div></div>}}<div style="padding:.45em .5em;position:relative">{{{1|}}}<span style=user-select:none></span></div></div><!-- | ||
--></div></div><!-- | --></div></div><!-- | ||
--></div></ | --></div></onlyinclude></includeonly> |
Revision as of 11:21, 30 April 2023
The above documentation is transcluded from Template:CodeBlock/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.