Site Notice
hello, world
Difference between revisions of "MediaWiki:Gadget-Highlight.css"
From Project-EPB Commons
m ([InPageEdit] 没有编辑摘要) |
([InPageEdit] 没有编辑摘要) |
||
Line 28: | Line 28: | ||
/* 行末添加不换行空格,保证空 div 的高度 */ | /* 行末添加不换行空格,保证空 div 的高度 */ | ||
content: "\a0"; | content: "\a0"; | ||
+ | } | ||
+ | pre.highlight.linenums .line-ping { | ||
+ | font-weight: bold; | ||
+ | background: #fbe7b2; | ||
} | } | ||
pre.highlight.linenums .line-container .line-numbers { | pre.highlight.linenums .line-container .line-numbers { |
Revision as of 22:14, 29 October 2020
pre.highlight {
font-size: 1rem;
line-height: 1.4;
padding: .85em;
word-wrap: normal;
word-break: break-all;
white-space: pre;
overflow-x: auto;
}
pre.highlight.linenums {
padding: 0;
position: relative;
}
pre.highlight.linenums .line-container {
position: relative;
}
pre.highlight.linenums .line-container .line-content {
position: relative;
width: calc(100% - 3em);
left: 3em;
overflow-x: auto;
}
pre.highlight.linenums .line-content .line-row {
padding: 0;
margin: 0;
}
pre.highlight.linenums .line-content .line-row::after {
/* 行末添加不换行空格,保证空 div 的高度 */
content: "\a0";
}
pre.highlight.linenums .line-ping {
font-weight: bold;
background: #fbe7b2;
}
pre.highlight.linenums .line-container .line-numbers {
position: absolute;
pointer-events: none;
user-select: none;
top: 0;
left: 0;
width: 3em;
padding: 0;
margin: 0;
text-align: center;
}
pre.highlight.linenums .line-container .line-numbers .line-number-block {
color: #a0a0a0;
}