|
| 1 | +/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript&plugins=line-numbers+toolbar+show-language+copy-to-clipboard */ |
| 2 | +/** |
| 3 | + * okaidia theme for JavaScript, CSS and HTML |
| 4 | + * Loosely based on Monokai textmate theme by http://www.monokai.nl/ |
| 5 | + * @author ocodia |
| 6 | + */ |
| 7 | + |
| 8 | +code[class*="language-"], |
| 9 | +pre[class*="language-"] { |
| 10 | + color: #f8f8f2; |
| 11 | + background: none; |
| 12 | + text-shadow: 0 1px rgba(0, 0, 0, 0.3); |
| 13 | + font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; |
| 14 | + text-align: left; |
| 15 | + white-space: pre; |
| 16 | + word-spacing: normal; |
| 17 | + word-break: normal; |
| 18 | + word-wrap: normal; |
| 19 | + line-height: 1.5; |
| 20 | + |
| 21 | + -moz-tab-size: 4; |
| 22 | + -o-tab-size: 4; |
| 23 | + tab-size: 4; |
| 24 | + |
| 25 | + -webkit-hyphens: none; |
| 26 | + -moz-hyphens: none; |
| 27 | + -ms-hyphens: none; |
| 28 | + hyphens: none; |
| 29 | +} |
| 30 | + |
| 31 | +/* Code blocks */ |
| 32 | +pre[class*="language-"] { |
| 33 | + padding: 1em; |
| 34 | + margin: .5em 0; |
| 35 | + overflow: auto; |
| 36 | + border-radius: 0.3em; |
| 37 | +} |
| 38 | + |
| 39 | +:not(pre) > code[class*="language-"], |
| 40 | +pre[class*="language-"] { |
| 41 | + background: #272822; |
| 42 | +} |
| 43 | + |
| 44 | +/* Inline code */ |
| 45 | +:not(pre) > code[class*="language-"] { |
| 46 | + padding: .1em; |
| 47 | + border-radius: .3em; |
| 48 | + white-space: normal; |
| 49 | +} |
| 50 | + |
| 51 | +.token.comment, |
| 52 | +.token.prolog, |
| 53 | +.token.doctype, |
| 54 | +.token.cdata { |
| 55 | + color: slategray; |
| 56 | +} |
| 57 | + |
| 58 | +.token.punctuation { |
| 59 | + color: #f8f8f2; |
| 60 | +} |
| 61 | + |
| 62 | +.namespace { |
| 63 | + opacity: .7; |
| 64 | +} |
| 65 | + |
| 66 | +.token.property, |
| 67 | +.token.tag, |
| 68 | +.token.constant, |
| 69 | +.token.symbol, |
| 70 | +.token.deleted { |
| 71 | + color: #f92672; |
| 72 | +} |
| 73 | + |
| 74 | +.token.boolean, |
| 75 | +.token.number { |
| 76 | + color: #ae81ff; |
| 77 | +} |
| 78 | + |
| 79 | +.token.selector, |
| 80 | +.token.attr-name, |
| 81 | +.token.string, |
| 82 | +.token.char, |
| 83 | +.token.builtin, |
| 84 | +.token.inserted { |
| 85 | + color: #a6e22e; |
| 86 | +} |
| 87 | + |
| 88 | +.token.operator, |
| 89 | +.token.entity, |
| 90 | +.token.url, |
| 91 | +.language-css .token.string, |
| 92 | +.style .token.string, |
| 93 | +.token.variable { |
| 94 | + color: #f8f8f2; |
| 95 | +} |
| 96 | + |
| 97 | +.token.atrule, |
| 98 | +.token.attr-value, |
| 99 | +.token.function { |
| 100 | + color: #e6db74; |
| 101 | +} |
| 102 | + |
| 103 | +.token.keyword { |
| 104 | + color: #66d9ef; |
| 105 | +} |
| 106 | + |
| 107 | +.token.regex, |
| 108 | +.token.important { |
| 109 | + color: #fd971f; |
| 110 | +} |
| 111 | + |
| 112 | +.token.important, |
| 113 | +.token.bold { |
| 114 | + font-weight: bold; |
| 115 | +} |
| 116 | +.token.italic { |
| 117 | + font-style: italic; |
| 118 | +} |
| 119 | + |
| 120 | +.token.entity { |
| 121 | + cursor: help; |
| 122 | +} |
| 123 | + |
| 124 | +pre.line-numbers { |
| 125 | + position: relative; |
| 126 | + padding-left: 3.8em; |
| 127 | + counter-reset: linenumber; |
| 128 | +} |
| 129 | + |
| 130 | +pre.line-numbers > code { |
| 131 | + position: relative; |
| 132 | +} |
| 133 | + |
| 134 | +.line-numbers .line-numbers-rows { |
| 135 | + position: absolute; |
| 136 | + pointer-events: none; |
| 137 | + top: 0; |
| 138 | + font-size: 100%; |
| 139 | + left: -3.8em; |
| 140 | + width: 3em; /* works for line-numbers below 1000 lines */ |
| 141 | + letter-spacing: -1px; |
| 142 | + border-right: 1px solid #999; |
| 143 | + |
| 144 | + -webkit-user-select: none; |
| 145 | + -moz-user-select: none; |
| 146 | + -ms-user-select: none; |
| 147 | + user-select: none; |
| 148 | + |
| 149 | +} |
| 150 | + |
| 151 | + .line-numbers-rows > span { |
| 152 | + pointer-events: none; |
| 153 | + display: block; |
| 154 | + counter-increment: linenumber; |
| 155 | + } |
| 156 | + |
| 157 | + .line-numbers-rows > span:before { |
| 158 | + content: counter(linenumber); |
| 159 | + color: #999; |
| 160 | + display: block; |
| 161 | + padding-right: 0.8em; |
| 162 | + text-align: right; |
| 163 | + } |
| 164 | +pre.code-toolbar { |
| 165 | + position: relative; |
| 166 | +} |
| 167 | + |
| 168 | +pre.code-toolbar > .toolbar { |
| 169 | + position: absolute; |
| 170 | + top: .3em; |
| 171 | + right: .2em; |
| 172 | + transition: opacity 0.3s ease-in-out; |
| 173 | + opacity: 0; |
| 174 | +} |
| 175 | + |
| 176 | +pre.code-toolbar:hover > .toolbar { |
| 177 | + opacity: 1; |
| 178 | +} |
| 179 | + |
| 180 | +pre.code-toolbar > .toolbar .toolbar-item { |
| 181 | + display: inline-block; |
| 182 | +} |
| 183 | + |
| 184 | +pre.code-toolbar > .toolbar a { |
| 185 | + cursor: pointer; |
| 186 | +} |
| 187 | + |
| 188 | +pre.code-toolbar > .toolbar button { |
| 189 | + background: none; |
| 190 | + border: 0; |
| 191 | + color: inherit; |
| 192 | + font: inherit; |
| 193 | + line-height: normal; |
| 194 | + overflow: visible; |
| 195 | + padding: 0; |
| 196 | + -webkit-user-select: none; /* for button */ |
| 197 | + -moz-user-select: none; |
| 198 | + -ms-user-select: none; |
| 199 | +} |
| 200 | + |
| 201 | +pre.code-toolbar > .toolbar a, |
| 202 | +pre.code-toolbar > .toolbar button, |
| 203 | +pre.code-toolbar > .toolbar span { |
| 204 | + color: #bbb; |
| 205 | + font-size: .8em; |
| 206 | + padding: 0 .5em; |
| 207 | + background: #f5f2f0; |
| 208 | + background: rgba(224, 224, 224, 0.2); |
| 209 | + box-shadow: 0 2px 0 0 rgba(0,0,0,0.2); |
| 210 | + border-radius: .5em; |
| 211 | +} |
| 212 | + |
| 213 | +pre.code-toolbar > .toolbar a:hover, |
| 214 | +pre.code-toolbar > .toolbar a:focus, |
| 215 | +pre.code-toolbar > .toolbar button:hover, |
| 216 | +pre.code-toolbar > .toolbar button:focus, |
| 217 | +pre.code-toolbar > .toolbar span:hover, |
| 218 | +pre.code-toolbar > .toolbar span:focus { |
| 219 | + color: inherit; |
| 220 | + text-decoration: none; |
| 221 | +} |
| 222 | + |
0 commit comments