2023年政策修订增补工作正在进行中,欢迎参与!
  • Moegirl.ICU:萌娘百科流亡社群 581077156(QQ),欢迎对萌娘百科运营感到失望的编辑者加入
  • Moegirl.ICU:账号认领正在试运行,有意者请参照账号认领流程

User:机智的小鱼君/gadget/Highlight.css

萌娘百科,万物皆可萌的百科全书!转载请标注来源页面的网页链接,并声明引自萌娘百科。内容不可商用。
跳转到导航 跳转到搜索

注意:在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • Firefox/Safari:按住“Shift”的同时单击“刷新”,或按“Ctrl-F5”或“Ctrl-R”(Mac为“⌘-R”)
  • Google Chrome:按“Ctrl-Shift-R”(Mac为“⌘-Shift-R”)
  • Internet Explorer:按住“Ctrl”的同时单击“刷新”,或按“Ctrl-F5”
  • Opera:在“工具→首选项”中清除缓存
如果您已登录但该页面出现未登录状态,请尝试在地址栏的地址最后添加代码?_=1来访问最新页面。
添加代码后的本页地址如下:-{R|https://moegirl.icu/User:%E6%9C%BA%E6%99%BA%E7%9A%84%E5%B0%8F%E9%B1%BC%E5%90%9B/gadget/Highlight.css?_=1}-
/**
 * @theme solarized
 * @desc  Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <[email protected]>
 */
#mw-content-text .hljs.hljs {
  display: block;
  overflow-x: auto;
  padding: 0.5em;
  background: #fdf6e3;
  color: #657b83;
}
.hljs-comment,
.hljs-quote {
  color: #93a1a1;
}
/* Solarized Green */
.hljs-keyword,
.hljs-selector-tag,
.hljs-addition {
  color: #859900;
}
/* Solarized Cyan */
.hljs-number,
.hljs-string,
.hljs-meta .hljs-meta-string,
.hljs-literal,
.hljs-doctag,
.hljs-regexp {
  color: #2aa198;
}
/* Solarized Blue */
.hljs-title,
.hljs-section,
.hljs-name,
.hljs-selector-id,
.hljs-selector-class {
  color: #268bd2;
}
/* Solarized Yellow */
.hljs-attribute,
.hljs-attr,
.hljs-variable,
.hljs-template-variable,
.hljs-class .hljs-title,
.hljs-type {
  color: #b58900;
}
/* Solarized Orange */
.hljs-symbol,
.hljs-bullet,
.hljs-subst,
.hljs-meta,
.hljs-meta .hljs-keyword,
.hljs-selector-attr,
.hljs-selector-pseudo,
.hljs-link {
  color: #cb4b16;
}
/* Solarized Red */
.hljs-built_in,
.hljs-deletion {
  color: #dc322f;
}
.hljs-formula {
  background: #eee8d5;
}
.hljs-emphasis {
  font-style: italic;
}
.hljs-strong {
  font-weight: bold;
}

/* Custom */
pre.highlight {
  font-size: 1rem;
  line-height: 1.4;
  padding: 0;
  word-wrap: normal;
  word-break: break-all;
  white-space: pre;
  overflow: hidden;
  font-weight: normal;
  position: relative;
}
pre.highlight .highlight-container {
  overflow-x: auto;
  padding: 0.4rem;
}
pre.highlight.linenums .highlight-container {
  padding: 0.4rem 0;
}
pre.highlight.linenums,
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;
  margin: 0;
  padding: 0.4rem 0;
  text-align: center;
}
pre.highlight.linenums .line-container .line-numbers .line-number-block {
  color: #a0a0a0;
}

/* Language badges */
pre.hljs[class*='lang-']:before {
  position: absolute;
  color: #fff;
  z-index: 3;
  line-height: 1;
  top: 0.4rem;
  right: 1rem;
  background-color: rgba(183, 129, 0, 0.75);
  padding: 0.2rem 0.4rem;
  border-radius: 1rem;
}
pre.hljs[class~='lang-js']:before,
pre.hljs[class~='lang-javascript']:before {
  content: 'js';
}
pre.hljs[class~='lang-lua']:before {
  content: 'lua';
}
pre.hljs[class~='lang-ts']:before,
pre.hljs[class~='lang-typescript']:before {
  content: 'ts';
}
pre.hljs[class~='lang-html']:before,
pre.hljs[class~='lang-markup']:before {
  content: 'html';
}
pre.hljs[class~='lang-md']:before,
pre.hljs[class~='lang-markdown']:before {
  content: 'md';
}
pre.hljs[class~='lang-vue']:before {
  content: 'vue';
}
pre.hljs[class~='lang-css']:before {
  content: 'css';
}
pre.hljs[class~='lang-sass']:before {
  content: 'sass';
}
pre.hljs[class~='lang-scss']:before {
  content: 'scss';
}
pre.hljs[class~='lang-less']:before {
  content: 'less';
}
pre.hljs[class~='lang-stylus']:before {
  content: 'stylus';
}
pre.hljs[class~='lang-go']:before {
  content: 'go';
}
pre.hljs[class~='lang-java']:before {
  content: 'java';
}
pre.hljs[class~='lang-c']:before {
  content: 'c';
}
pre.hljs[class~='lang-sh']:before {
  content: 'sh';
}
pre.hljs[class~='lang-yaml']:before {
  content: 'yaml';
}
pre.hljs[class~='lang-py']:before {
  content: 'py';
}
pre.hljs[class~='lang-docker']:before {
  content: 'docker';
}
pre.hljs[class~='lang-dockerfile']:before {
  content: 'dockerfile';
}
pre.hljs[class~='lang-makefile']:before {
  content: 'makefile';
}
pre.hljs[class~='lang-json']:before {
  content: 'json';
}
pre.hljs[class~='lang-ruby']:before {
  content: 'rb';
}
pre.hljs[class~='lang-python']:before {
  content: 'py';
}
pre.hljs[class~='lang-bash']:before {
  content: 'sh';
}
pre.hljs[class~='lang-php']:before {
  content: 'php';
}
pre.hljs[class~='lang-wiki']:before {
  content: 'wiki';
}