Site Notice
hello, world
Difference between revisions of "MediaWiki:Css-prettify.css"
From Project-EPB Commons
m |
|||
Line 39: | Line 39: | ||
/** 自定义样式 **/ | /** 自定义样式 **/ | ||
pre.prettyprint { | pre.prettyprint { | ||
− | padding: | + | padding: 2px; |
background: #f8f9fa; | background: #f8f9fa; | ||
+ | border: 2px dashed darkred; | ||
} | } | ||
.prettyprint ol.linenums { | .prettyprint ol.linenums { | ||
− | margin | + | margin: 0; |
− | + | display: table; | |
} | } | ||
.prettyprint ol.linenums li { | .prettyprint ol.linenums li { | ||
list-style-type: unset; | list-style-type: unset; | ||
background: #f8f9fa; | background: #f8f9fa; | ||
+ | display: table-row; | ||
} | } | ||
.prettyprint ol.linenums li:nth-of-type(2n-1) { | .prettyprint ol.linenums li:nth-of-type(2n-1) { | ||
− | background: # | + | background: #efefef; |
} | } | ||
.prettyprint ol.linenums { | .prettyprint ol.linenums { | ||
Line 58: | Line 60: | ||
counter-reset: sectioncounter; | counter-reset: sectioncounter; | ||
} | } | ||
− | .prettyprint ol.linenums | + | .prettyprint ol.linenums li:before { |
− | display: | + | display: table-cell; |
content: counter(sectioncounter); | content: counter(sectioncounter); | ||
counter-increment: sectioncounter; | counter-increment: sectioncounter; | ||
text-align: center; | text-align: center; | ||
width: 3em; | width: 3em; | ||
− | + | line-height: 1; | |
color: #666; | color: #666; | ||
− | + | border-right: 2px solid #6ce26c; | |
− | border: | ||
− | |||
} | } |
Revision as of 00:30, 10 November 2019
.prettyprint .pln {
color: #1b1ea4;
}
.prettyprint .str {
color: #080;
}
.prettyprint .kwd {
color: #9b1001;
}
.prettyprint .com {
color: #9a9a9a;
}
.prettyprint .typ {
color: #606
}
.prettyprint .lit {
color: #066
}
.prettyprint .pun,.opn,.clo {
color: #660
}
.prettyprint .tag {
color: #008
}
.prettyprint .atn {
color: #606
}
.prettyprint .atv {
color: #080
}
.prettyprint .dec,
.prettyprint .var {
color: #606
}
.prettyprint .fun {
color: red
}
/** 自定义样式 **/
pre.prettyprint {
padding: 2px;
background: #f8f9fa;
border: 2px dashed darkred;
}
.prettyprint ol.linenums {
margin: 0;
display: table;
}
.prettyprint ol.linenums li {
list-style-type: unset;
background: #f8f9fa;
display: table-row;
}
.prettyprint ol.linenums li:nth-of-type(2n-1) {
background: #efefef;
}
.prettyprint ol.linenums {
margin: 0;
list-style: none;
counter-reset: sectioncounter;
}
.prettyprint ol.linenums li:before {
display: table-cell;
content: counter(sectioncounter);
counter-increment: sectioncounter;
text-align: center;
width: 3em;
line-height: 1;
color: #666;
border-right: 2px solid #6ce26c;
}