1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-06-30 05:31:56 +02:00

syntax highlighting tweaks

This commit is contained in:
Matthias Kretschmann 2018-07-18 23:14:47 +02:00
parent 9246bf7ea8
commit 32c7155f93
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 54 additions and 119 deletions

View File

@ -64,16 +64,16 @@ pre {
} }
} }
pre > code.language-bash { pre > code.language-shell {
padding-left: 1.5em; padding-left: $spacer / 2;
display: block; display: block;
&::before { &::before {
content: '$'; content: '$';
opacity: .5; opacity: .4;
display: inline-block; display: inline-block;
margin-left: -.5em; margin-left: -.5rem;
margin-right: .8em; margin-right: .5rem;
} }
} }

View File

@ -1,114 +1,78 @@
/* /**
Name: Duotone Space * prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
Author: Simurai, adapted from DuoTone themes for Atom (http://simurai.com/projects/2016/01/01/duotone-themes) * Based on https://github.com/chriskempson/tomorrow-theme
* @author Rose Pritchard
Conversion: Bram de Haan (http://atelierbram.github.io/Base2Tone-prism/output/prism/prism-base2tone-space-dark.css) */
Generated with Base16 Builder (https://github.com/base16-builder/base16-builder)
*/
code[class*='language-'], code[class*='language-'],
pre[class*='language-'] { pre[class*='language-'] {
direction: ltr;
text-align: left;
tab-size: 4; tab-size: 4;
hyphens: none; hyphens: none;
background: #24242e;
color: #767693;
}
pre[class*='language-']::-moz-selection,
pre[class*='language-'] ::-moz-selection,
code[class*='language-']::-moz-selection,
code[class*='language-'] ::-moz-selection {
text-shadow: none;
background: #5151e6;
}
pre[class*='language-']::selection,
pre[class*='language-'] ::selection,
code[class*='language-']::selection,
code[class*='language-'] ::selection {
text-shadow: none;
background: #5151e6;
} }
/* Inline code */ /* Inline code */
// :not(pre) > code[class*='language-'] { :not(pre) > code[class*='language-'] {
// } padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment, .token.comment,
.token.block-comment,
.token.prolog, .token.prolog,
.token.doctype, .token.doctype,
.token.cdata { .token.cdata {
color: #5b5b76; color: #999;
} }
.token.punctuation { .token.punctuation {
color: #5b5b76; color: #ccc;
}
.token.namespace {
opacity: .7;
} }
.token.tag, .token.tag,
.token.operator, .token.attr-name,
.token.number { .token.namespace,
color: #dd672c; .token.deleted {
color: #e2777a;
}
.token.function-name {
color: #6196cc;
}
.token.boolean,
.token.number,
.token.function {
color: #f08d49;
} }
.token.property, .token.property,
.token.function { .token.class-name,
color: #767693; .token.constant,
.token.symbol {
color: #f8c555;
} }
.token.tag-id,
.token.selector, .token.selector,
.token.atrule-id { .token.important,
color: #ebebff; .token.atrule,
}
code.language-javascript,
.token.attr-name {
color: #aaaaca;
}
code.language-css,
code.language-scss,
.token.boolean,
.token.string,
.token.entity,
.token.url,
.language-css .token.string,
.language-scss .token.string,
.style .token.string,
.token.attr-value,
.token.keyword, .token.keyword,
.token.control, .token.builtin {
.token.directive, color: #cc99cd;
.token.unit, }
.token.statement,
.token.string,
.token.char,
.token.attr-value,
.token.regex, .token.regex,
.token.atrule {
color: #fe8c52;
}
.token.placeholder,
.token.variable { .token.variable {
color: #fe8c52; color: #7ec699;
} }
.token.deleted { .token.operator,
text-decoration: line-through; .token.entity,
} .token.url {
color: #67cdcc;
.token.inserted {
border-bottom: 1px dotted #ebebff;
text-decoration: none;
}
.token.italic {
font-style: italic;
} }
.token.important, .token.important,
@ -116,43 +80,14 @@ code.language-scss,
font-weight: bold; font-weight: bold;
} }
.token.important { .token.italic {
color: #aaaaca; font-style: italic;
} }
.token.entity { .token.entity {
cursor: help; cursor: help;
} }
pre > code.highlight { .token.inserted {
outline: .4em solid #7676f4; color: green;
outline-offset: .4em;
}
/* overrides color-values for the Line Numbers plugin
* http://prismjs.com/plugins/line-numbers/
*/
.line-numbers .line-numbers-rows {
border-right-color: #262631;
}
.line-numbers-rows > span::before {
color: #393949;
}
/* overrides color-values for the Line Highlight plugin
* http://prismjs.com/plugins/line-highlight/
*/
.line-highlight {
background: rgba(221, 103, 44, .2);
background: -webkit-linear-gradient(
left,
rgba(221, 103, 44, .2) 70%,
rgba(221, 103, 44, 0)
);
background: linear-gradient(
to right,
rgba(221, 103, 44, .2) 70%,
rgba(221, 103, 44, 0)
);
} }