Use prism as smaller nicer code highlighting library
This commit is contained in:
@@ -28,7 +28,7 @@ $weight-bold: 400;
|
||||
|
||||
@import "checkmark-icon";
|
||||
@import 'demo';
|
||||
@import 'highlight';
|
||||
@import 'prism';
|
||||
|
||||
.field_with_errors input {
|
||||
border-color: $red;
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
code.html .hljs-tag:first-child .hljs-attr, code.html .hljs-tag:first-child .hljs-string {
|
||||
font-weight: bold;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
131
app/assets/stylesheets/prism.css.scss
Normal file
131
app/assets/stylesheets/prism.css.scss
Normal file
@@ -0,0 +1,131 @@
|
||||
/* PrismJS 1.20.0
|
||||
https://prismjs.com/download.html#themes=prism-okaidia&languages=markup+css+clike+javascript&plugins=custom-class */
|
||||
/**
|
||||
* okaidia theme for JavaScript, CSS and HTML
|
||||
* Loosely based on Monokai textmate theme by http://www.monokai.nl/
|
||||
* @author ocodia
|
||||
*/
|
||||
|
||||
code.language-html > .prism-tag:first-child {
|
||||
font-weight: bold;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
color: #f8f8f2;
|
||||
background: none;
|
||||
text-shadow: 0 1px rgba(0, 0, 0, 0.3);
|
||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||
font-size: 1em;
|
||||
text-align: left;
|
||||
white-space: pre;
|
||||
word-spacing: normal;
|
||||
word-break: normal;
|
||||
word-wrap: normal;
|
||||
line-height: 1.5;
|
||||
|
||||
-moz-tab-size: 4;
|
||||
-o-tab-size: 4;
|
||||
tab-size: 4;
|
||||
|
||||
-webkit-hyphens: none;
|
||||
-moz-hyphens: none;
|
||||
-ms-hyphens: none;
|
||||
hyphens: none;
|
||||
}
|
||||
|
||||
/* Code blocks */
|
||||
pre[class*="language-"] {
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
:not(pre) > code[class*="language-"],
|
||||
pre[class*="language-"] {
|
||||
background: #272822;
|
||||
}
|
||||
|
||||
/* Inline code */
|
||||
:not(pre) > code[class*="language-"] {
|
||||
padding: .1em;
|
||||
border-radius: .3em;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.prism-token.prism-comment,
|
||||
.prism-token.prism-prolog,
|
||||
.prism-token.prism-doctype,
|
||||
.prism-token.prism-cdata {
|
||||
color: slategray;
|
||||
}
|
||||
|
||||
.prism-token.prism-punctuation {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.prism-token.prism-namespace {
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.prism-token.prism-property,
|
||||
.prism-token.prism-tag,
|
||||
.prism-token.prism-constant,
|
||||
.prism-token.prism-symbol,
|
||||
.prism-token.prism-deleted {
|
||||
color: #f92672;
|
||||
}
|
||||
|
||||
.prism-token.prism-boolean,
|
||||
.prism-token.prism-number {
|
||||
color: #ae81ff;
|
||||
}
|
||||
|
||||
.prism-token.prism-selector,
|
||||
.prism-token.prism-attr-name,
|
||||
.prism-token.prism-string,
|
||||
.prism-token.prism-char,
|
||||
.prism-token.prism-builtin,
|
||||
.prism-token.prism-inserted {
|
||||
color: #a6e22e;
|
||||
}
|
||||
|
||||
.prism-token.prism-operator,
|
||||
.prism-token.prism-entity,
|
||||
.prism-token.prism-url,
|
||||
.prism-language-css .prism-token.prism-string,
|
||||
.prism-style .prism-token.prism-string,
|
||||
.prism-token.prism-variable {
|
||||
color: #f8f8f2;
|
||||
}
|
||||
|
||||
.prism-token.prism-atrule,
|
||||
.prism-token.prism-attr-value,
|
||||
.prism-token.prism-function,
|
||||
.prism-token.prism-class-name {
|
||||
color: #e6db74;
|
||||
}
|
||||
|
||||
.prism-token.prism-keyword {
|
||||
color: #66d9ef;
|
||||
}
|
||||
|
||||
.prism-token.prism-regex,
|
||||
.token.important {
|
||||
color: #fd971f;
|
||||
}
|
||||
|
||||
.prism-token.prism-important,
|
||||
.prism-token.prism-bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
.prism-token.prism-italic {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
.prism-token.prism-entity {
|
||||
cursor: help;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user