/* * Based on Plugin: Syntax Highlighter CB * Plugin URI: http://wp.tutsplus.com/tutorials/plugins/adding-a-syntax-highlighter-shortcode-using-prism-js * Description: Highlight your code snippets with an easy to use shortcode based on Lea Verou's Prism.js. * Version: 1.0.0 * Author: c.bavota * Author URI: http://bavotasan.comhttp://wp.tutsplus.com/tutorials/plugins/adding-a-syntax-highlighter-shortcode-using-prism-js/ */ /* http://cbavota.bitbucket.org/syntax-highlighter/ */ /* ===== ===== */ code[class*="language-"], pre { color: #fff; text-shadow: 0 1px 1px #000; } pre, :not(pre) > code[class*="language-"] { background-color: #222; } .token.comment, .token.prolog, .token.doctype, .token.cdata { color: #797979; } .token.selector, .token.operator, .token.punctuation { color: #fff; } .token.namespace { opacity: .7; } .token.tag, .token.boolean { color: #ffd893; } .token.atrule, .token.attr-value, .token.hex, .token.string { color: #B0C975; } .token.property, .token.entity, .token.url, .token.attr-name, .token.keyword { color: #c27628; } .token.regex { color: #9B71C6; } .token.entity { cursor: help; } .token.function, .token.constant { color: #e5a638; } .token.variable { color: #fdfba8; } .token.number { color: #8799B0; } .token.important, .token.deliminator { color: #E45734; } /* Line highlight plugin */ pre[data-line] { position: relative; padding: 1em 0 1em 3em; } .line-highlight { position: absolute; left: 0; right: 0; margin-top: 1em; /* Same as .prism's padding-top */ background-color: rgba(255,255,255,.2); pointer-events: none; line-height: inherit; white-space: pre; } .line-highlight:before, .line-highlight[data-end]:after { content: attr(data-start); position: absolute; top: .3em; left: .6em; min-width: 1em; padding: 0 .5em; background-color: rgba(255,255,255,.3); color: #fff; font: bold 65%/1.5 sans-serif; text-align: center; -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; text-shadow: none; } .line-highlight[data-end]:after { content: attr(data-end); top: auto; bottom: .4em; } /* for line numbers */ .line-numbers-rows { margin: 0; } .line-numbers-rows span { padding-right: 10px; border-right: 3px #d9d336 solid; }