Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/**
* CodeblockLineNumbers CSS
*/
.mw-highlight ol.lineNumbers {
&:not(.obs) li .hll:last-child {
display: unset;
text-indent: unset;
margin-left: unset;
background-color: rgb(var(--theme-accent-color--rgb), 0.2);
}
& li .hll {
text-indent: 0;
margin-left: -3ch;
background-color: transparent;
& + .p {
margin-left: -3ch;
}
}
}
pre ol.lineNumbers {
list-style: none !important;
counter-reset: lines;
border-left: 1px solid rgb(125, 125, 125);
border-left: 1px solid rgba(125, 125, 125, 0.5);
}
.skin-fandomdesktop pre ol.lineNumbers {
line-height: 16px;
}
pre ol.lineNumbers .no-list {
list-style: none;
margin: 0;
}
pre ol.lineNumbers li {
text-indent: -4ch;
/* margin-left: -0.5ch; */
padding-left: 3.5ch;
}
pre ol.lineNumbers li::before {
/*width: 3ch;*/
color: #718184;
display: inline-block;
font-style: normal;
margin-right: 0.5ch;
padding-right: 0.5ch;
text-align: right;
content: counter(lines);
counter-increment: lines;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
-o-user-select: none;
user-select: none;
}
pre ol.lineNumbers.obs li .hll {
display: unset;
text-indent: unset;
background-color: rgba(var(--theme-accent-color--rgb), 0.2);
/* initial background highlight colour, only for `obs` blocks */
}
.mw-highlight pre ol.lineNumbers.obs li a:hover .linenos,
pre ol.lineNumbers.obs li .hll .linenos {
color: unset;
/* falls back to use theme link colour */
/* preferred over the dark grey fandom uses that blends in to backgrounds on dark themes */
}
pre ol.lineNumbers.obs li .linenos {
width: unset;
position: unset;
padding-left: unset;
padding-right: 0.5ch;
margin-left: -3ch;
margin-right: 0.5ch;
}
pre ol.lineNumbers.obs li .linenos::before {
display: inline-block;
text-align: right;
width: 2ch;
user-select: none;
}
pre ol.lineNumbers.obs li::before {
visibility: hidden;
}
body .mw-content-ltr.mw-highlight-lines pre,
body .mw-content-ltr.content .mw-highlight-lines pre {
padding-left: 12px;
box-shadow: unset;
}
/*@end@*/