mirror of
https://github.com/next-theme/hexo-theme-next.git
synced 2026-01-17 18:22:33 +00:00
122 lines
2.0 KiB
Stylus
122 lines
2.0 KiB
Stylus
@import hexo-config('highlight.light.file');
|
|
|
|
if (hexo-config('darkmode')) {
|
|
@media (prefers-color-scheme: dark) {
|
|
@import hexo-config('highlight.dark.file');
|
|
}
|
|
}
|
|
|
|
@import 'copy-code' if (hexo-config('codeblock.copy_button.enable'));
|
|
|
|
// Placeholder: $code-inline $code-block
|
|
$code-inline {
|
|
background: var(--highlight-background);
|
|
color: var(--highlight-foreground);
|
|
}
|
|
|
|
$code-block {
|
|
@extend $code-inline;
|
|
line-height: $line-height-code-block;
|
|
margin: 0 auto 20px;
|
|
}
|
|
|
|
pre, code {
|
|
font-family: $code-font-family;
|
|
}
|
|
|
|
code {
|
|
@extend $code-inline;
|
|
border-radius: 3px;
|
|
padding: 2px 4px;
|
|
word-wrap();
|
|
}
|
|
|
|
kbd {
|
|
@extend $code-inline;
|
|
border: 1px solid $grey-light;
|
|
border-radius: .2em;
|
|
box-shadow: .1em .1em .2em rgba(0, 0, 0, .1);
|
|
font-family: inherit;
|
|
padding: .1em .3em;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.highlight {
|
|
@extend $code-block;
|
|
position: relative;
|
|
|
|
pre {
|
|
border: 0;
|
|
margin: 0;
|
|
padding: 10px 0;
|
|
}
|
|
|
|
table {
|
|
border: 0;
|
|
margin: 0;
|
|
width: auto;
|
|
}
|
|
|
|
td {
|
|
border: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
figcaption {
|
|
background: var(--highlight-gutter-background);
|
|
color: var(--highlight-foreground);
|
|
display: flow-root;
|
|
font-size: $table-font-size;
|
|
line-height: 1.2;
|
|
padding: .5em;
|
|
|
|
a {
|
|
color: var(--highlight-foreground);
|
|
float: right;
|
|
|
|
&:hover {
|
|
border-bottom-color: var(--highlight-foreground);
|
|
}
|
|
}
|
|
}
|
|
|
|
.gutter {
|
|
disable-user-select();
|
|
|
|
pre {
|
|
background: var(--highlight-gutter-background);
|
|
color: var(--highlight-gutter-foreground);
|
|
padding-left: 10px;
|
|
padding-right: 10px;
|
|
text-align: right;
|
|
}
|
|
}
|
|
|
|
.code pre {
|
|
background: var(--highlight-background);
|
|
padding-left: 10px;
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.gist table {
|
|
width: auto;
|
|
|
|
td {
|
|
border: 0;
|
|
}
|
|
}
|
|
|
|
pre {
|
|
@extend $code-block;
|
|
overflow: auto;
|
|
padding: 10px;
|
|
|
|
code {
|
|
background: none;
|
|
font-size: $table-font-size;
|
|
padding: 0;
|
|
text-shadow: none;
|
|
}
|
|
}
|