hexo-theme-ayer/source-src/css/_partial/highlight.styl

261 lines
4.9 KiB
Stylus
Raw Normal View History

2019-12-30 13:47:25 +00:00
highlight-background = #2d2d2d
2019-12-30 14:00:24 +00:00
highlight-code = #f2f2f2
highlight-code-color = #c7254e
2020-02-09 05:36:33 +00:00
highlight-current-line = grey
2019-12-30 13:47:25 +00:00
highlight-selection = #000
highlight-foreground = #dedede
2019-12-03 11:37:44 +00:00
highlight-comment = #8e908c
highlight-red = #f2777a
highlight-orange = #f99157
highlight-yellow = #ffcc66
highlight-green = #99cc99
highlight-aqua = #66cccc
highlight-blue = #6699cc
highlight-purple = #cc99cc
2020-02-09 05:36:33 +00:00
.article-entry pre,
.article-entry .highlight {
background: highlight-background;
margin: 10px 0;
padding: 10px 10px;
overflow: hidden;
overflow-x: auto;
color: highlight-foreground;
font-size: 0.9em;
2020-02-11 05:05:04 +00:00
line-height: 1.5;
2020-02-09 05:36:33 +00:00
/** */
&::-webkit-scrollbar {
height: 10px;
width: 7px;
background: rgba(0, 0, 0, 0.1);
/* */
/* width: 10px;
height: 10px;
background: #ccc;
border-radius: 0; */
}
&::-webkit-scrollbar:hover {
background: rgba(0, 0, 0, 0.2);
}
/* */
&::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.3);
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
-ms-border-radius: 6px;
-o-border-radius: 6px;
border-radius: 6px;
}
&::-webkit-scrollbar-thumb:hover {
-webkit-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);
/* Webkit browsers */
-moz-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);
/* Firefox */
-ms-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);
/* IE9 */
-o-box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);
/* Opera(Old) */
box-shadow: inset 1px 1px 1px rgba(0, 0, 0, 0.25);
/* IE9+, News */
background-color: rgba(0, 0, 0, 0.4);
}
/** */
&::-webkit-scrollbar-track {
/* box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); */
background: #ededed;
border-radius: 10px;
}
}
.article-entry .highlight .gutter pre,
.article-entry .highlight .gutter pre .line,
.article-entry .gist .gist-file .gist-data .line-numbers {
/* color: #666; */
color: highlight-current-line;
}
.article-entry pre,
.article-entry code {
2020-02-09 09:17:31 +00:00
font-family: Consolas,Monaco,"Andale Mono","Ubuntu Mono",monospace
2020-02-09 05:36:33 +00:00
}
.article-entry code {
background: #eee;
2020-02-09 09:17:31 +00:00
color: highlight-code-color;
2020-02-09 05:36:33 +00:00
padding: 0 0.3em;
border: none;
}
.article-entry pre code {
background: none;
text-shadow: none;
padding: 0;
color: highlight-foreground;
}
.article-entry .highlight {
border-radius: 4px;
}
.article-entry .highlight pre {
border: none;
margin: 0;
padding: 0;
}
.article-entry .highlight table {
margin: 0;
width: auto;
border: none;
}
.article-entry .highlight td {
border: none;
padding: 0;
}
.article-entry .highlight figcaption {
color: highlight-comment;
line-height: 1em;
margin-bottom: 1em;
}
.article-entry .highlight figcaption:before,
.article-entry .highlight figcaption:after {
content: "";
display: table;
}
.article-entry .highlight figcaption:after {
clear: both;
}
.article-entry .highlight figcaption a {
float: right;
}
.article-entry .highlight .gutter pre {
text-align: right;
padding-right: 20px;
}
.article-entry .highlight .gutter pre .line {
text-shadow: none;
}
.article-entry .highlight .line {
color: highlight-foreground;
min-height: 19px;
}
.article-entry .gist {
margin: 0 -20px;
border-style: solid;
border-color: #ddd;
border-width: 1px 0;
background: #272822;
padding: 15px 20px 15px 0;
}
.article-entry .gist .gist-file {
border: none;
font-family: "Source Code Pro", Consolas, Monaco, Menlo, Consolas, monospace;
margin: 0;
}
.article-entry .gist .gist-file .gist-data {
background: none;
border: none;
}
.article-entry .gist .gist-file .gist-data .line-numbers {
background: none;
border: none;
padding: 0 20px 0 0;
}
.article-entry .gist .gist-file .gist-data .line-data {
padding: 0 !important;
}
.article-entry .gist .gist-file .highlight {
margin: 0;
padding: 0;
border: none;
}
.article-entry .gist .gist-file .gist-meta {
background: #272822;
color: highlight-comment;
font: 0.85em "Helvetica Neue", Helvetica, Arial, sans-serif;
text-shadow: 0 0;
padding: 0;
margin-top: 1em;
margin-left: 20px;
}
.article-entry .gist .gist-file .gist-meta a {
color: #258fb8;
font-weight: normal;
}
.article-entry .gist .gist-file .gist-meta a:hover {
text-decoration: underline;
}
pre .comment {
/* color: #75715e; */
2020-02-09 09:17:31 +00:00
color: highlight-green
2020-02-09 05:36:33 +00:00
}
pre .keyword,
pre .function .keyword,
pre .class .params {
color: #66d9ef;
}
pre .tag,
pre .doctype,
pre .params,
pre .function,
pre .css .value {
color: highlight-foreground;
}
pre .css~* .tag,
pre .title,
pre .at_rule,
pre .at_rule .keyword,
pre .preprocessor,
pre .preprocessor .keyword {
color: #f92672;
}
pre .attribute,
pre .built_in,
pre .class,
pre .css~* .class,
pre .function .title {
color: #a6e22e;
}
pre .value,
pre .string {
color: highlight-foreground;
}
pre .number {
2020-02-09 09:17:31 +00:00
color: highlight-purple
2020-02-09 05:36:33 +00:00
}
pre .id,
pre .css~* .id {
color: #fd971f;
}