Site Notice

hello, world

Difference between revisions of "MediaWiki:Gadget-Highlight.css"

From Project-EPB Commons
([InPageEdit] 没有编辑摘要)
 
m ([InPageEdit] 没有编辑摘要)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
pre.hightlight {
+
pre.highlight {
 
   font-size: 1rem;
 
   font-size: 1rem;
 
   line-height: 1.4;
 
   line-height: 1.4;
Line 8: Line 8:
 
   overflow-x: auto;
 
   overflow-x: auto;
 
}
 
}
pre.hightlight.linenums {
+
pre.highlight.linenums {
 
   padding: 0;
 
   padding: 0;
 
   position: relative;
 
   position: relative;
 
}
 
}
pre.hightlight.linenums .line-container {
+
pre.highlight.linenums .line-container {
 
   position: relative;
 
   position: relative;
 
}
 
}
pre.hightlight.linenums .line-container .line-content {
+
pre.highlight.linenums .line-container .line-content {
 
   position: relative;
 
   position: relative;
 
   width: calc(100% - 3em);
 
   width: calc(100% - 3em);
Line 21: Line 21:
 
   overflow-x: auto;
 
   overflow-x: auto;
 
}
 
}
pre.hightlight.linenums .line-content .line-row {
+
pre.highlight.linenums .line-content .line-row {
 
   padding: 0;
 
   padding: 0;
 
   margin: 0;
 
   margin: 0;
 
}
 
}
pre.hightlight.linenums .line-content .line-row::after {
+
pre.highlight.linenums .line-content .line-row::after {
   content: "\a0"
+
  /* 行末添加不换行空格,保证空 div 的高度 */
 +
   content: "\a0";
 
}
 
}
pre.hightlight.linenums .line-container .line-numbers {
+
pre.highlight.linenums .line-ping {
 +
  background: #fbe7b2;
 +
}
 +
pre.highlight.linenums .line-numbers .line-ping {
 +
  font-weight: bold;
 +
}
 +
pre.highlight.linenums .line-container .line-numbers {
 
   position: absolute;
 
   position: absolute;
 
   pointer-events: none;
 
   pointer-events: none;
Line 39: Line 46:
 
   text-align: center;
 
   text-align: center;
 
}
 
}
pre.hightlight.linenums .line-container .line-numbers .line-number-block {
+
pre.highlight.linenums .line-container .line-numbers .line-number-block {
 
   color: #a0a0a0;
 
   color: #a0a0a0;
 
}
 
}

Latest revision as of 23:27, 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 {
  background: #fbe7b2;
}
pre.highlight.linenums .line-numbers .line-ping {
  font-weight: bold;
}
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;
}