Skip to content

Commit

Permalink
style: code highlight 代码高亮
Browse files Browse the repository at this point in the history
Replace Yilia highlight style with
"Hexo\themes\landscape\source\css\_partial\highlight.styl".
  • Loading branch information
MOxFIVE committed Aug 31, 2015
1 parent 5d875ef commit a56ce59
Showing 1 changed file with 156 additions and 147 deletions.
303 changes: 156 additions & 147 deletions themes/Yilia/source/css/_partial/highlight.styl
@@ -1,147 +1,156 @@
// https://github.com/chriskempson/tomorrow-theme // https://github.com/chriskempson/tomorrow-theme

highlight-background = #2d2d2d
code-bgc = #272822 highlight-current-line = #393939
code-tag = #F92672 highlight-selection = #515151
code-attr = #A6E22E highlight-foreground = #cccccc
code-word = #FFFFFF highlight-comment = #999999
code-value = #E6DB74 highlight-red = #f2777a
code-number = #7163D7 highlight-orange = #f99157
code-keyword = #66D9EF highlight-yellow = #ffcc66
code-comment = #75715E highlight-green = #99cc99
code-argument = #FD971F highlight-aqua = #66cccc

highlight-blue = #6699cc
$code-block highlight-purple = #cc99cc
background: code-bgc
margin: 10px 0 $code-block
padding: 10px 10px background: highlight-background
overflow: auto margin: 0 article-padding * -1
color: #4C4C4C padding: 15px article-padding
line-height: font-size * line-height border-style: solid
border-radius: 4px border-color: color-border

border-width: 1px 0
$line-numbers overflow: auto
color: #666 color: highlight-foreground

line-height: font-size * line-height
.article-entry
pre, code $line-numbers
font-family: font-mono color: #666
code font-size: 0.85em
background: color-background
padding: 0 0.3em .article-entry
border: none pre, code
pre font-family: font-mono
@extend $code-block code
color: code-word background: color-background
code text-shadow: 0 1px #fff
background: none padding: 0 0.3em
text-shadow: none pre
padding: 0 @extend $code-block
color: code-word code
.highlight background: none
@extend $code-block text-shadow: none
pre padding: 0
border: none .highlight
margin: 0 @extend $code-block
padding: 0 pre
table border: none
margin: 0 margin: 0
width: auto padding: 0
td table
border: none margin: 0
padding: 0 width: auto
figcaption td
clearfix() border: none
font-size: 0.85em padding: 0
color: highlight-comment figcaption
line-height: 1em clearfix()
margin-bottom: 1em font-size: 0.85em
a color: highlight-comment
float: right line-height: 1em
.gutter pre margin-bottom: 1em
@extend $line-numbers a
text-align: right float: right
padding-right: 20px .gutter pre
.line @extend $line-numbers
text-shadow: none text-align: right
.line padding-right: 20px
font-size: 15px .line
height: 15px height: font-size * line-height
.gist .gist
margin: 0 article-padding * -1 margin: 0 article-padding * -1
border-style: solid border-style: solid
border-color: color-border border-color: color-border
border-width: 1px 0 border-width: 1px 0
background: code-bgc background: highlight-background
padding: 15px article-padding 15px 0 padding: 15px article-padding 15px 0
.gist-file .gist-file
border: none border: none
font-family: font-mono font-family: font-mono
margin: 0 margin: 0
.gist-data .gist-data
background: none background: none
border: none border: none
.line-numbers .line-numbers
@extend $line-numbers @extend $line-numbers
background: none background: none
border: none border: none
padding: 0 20px 0 0 padding: 0 20px 0 0
.line-data .line-data
padding: 0 !important padding: 0 !important
.highlight .highlight
margin: 0 margin: 0
padding: 0 padding: 0
border: none border: none
.gist-meta .gist-meta
background: code-bgc background: highlight-background
color: highlight-comment color: highlight-comment
font: 0.85em font-sans font: 0.85em font-sans
text-shadow: 0 0 text-shadow: 0 0
padding: 0 padding: 0
margin-top: 1em margin-top: 1em
margin-left: article-padding margin-left: article-padding
a a
color: color-link color: color-link
font-weight: normal font-weight: normal
&:hover &:hover
text-decoration: underline text-decoration: underline


pre pre
.comment .comment
color: code-comment .title

color: highlight-comment
.keyword .variable
.function .keyword .attribute
.class .params .tag
color: #66D9EF .regexp

.ruby .constant
.tag .xml .tag .title
.doctype .xml .pi
.params .xml .doctype
.function .html .doctype
color: code-word .css .id

.css .class
.css ~ * .tag .css .pseudo
.title color: highlight-red
.at_rule .number
.at_rule .keyword .preprocessor
.preprocessor .built_in
.preprocessor .keyword .literal
color: code-tag .params

.constant
.attribute color: highlight-orange
.built_in .class
.class .ruby .class .title
.css ~ * .class .css .rules .attribute
.function .title color: highlight-green
color: code-attr .string

.value
.value .inheritance
.string .header
color: code-value .ruby .symbol

.xml .cdata
.number color: highlight-green
color: #7163D7 .css .hexcolor

color: highlight-aqua
.id .function
.css ~ * .id .python .decorator
color: code-argument .python .title
.ruby .function .title
.ruby .title .keyword
.perl .sub
.javascript .title
.coffeescript .title
color: highlight-blue
.keyword
.javascript .function
color: highlight-purple

0 comments on commit a56ce59

Please sign in to comment.