Skip to content

Commit

Permalink
New Theme for PrismJS - Solarized Light
Browse files Browse the repository at this point in the history
I quite like the solarized themes - they are pretty accessible and a lot of work was done on created something that is easy on the eyes. I ported Solarized Light for PrismJS. It would be pretty cool if the solarized themes were included with PrismJS! However, after some research, I couldn't quite see any attribution rules so I provided a link to the original creator of the solarized formats in a comment at the top of the css file.
  • Loading branch information
hectormatos2011 committed Jan 17, 2016
1 parent 3ebcb66 commit 70846ba
Showing 1 changed file with 177 additions and 0 deletions.
177 changes: 177 additions & 0 deletions themes/prism-solarizedlight
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
/*
Solarized Color Schemes originally by Ethan Schoonover
http://ethanschoonover.com/solarized

Ported for PrismJS by Hector Matos
Website: https://krakendev.io
Twitter Handle: https://twitter.com/allonsykraken)
*/

code[class*="language-"],
pre[class*="language-"] {
color: #2176c7;
font-family: Consolas, Monaco, 'Andale Mono', monospace;
direction: ltr;
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: #eee8d5;
}

/* Inline code */
:not(pre) > code[class*="language-"] {
padding: .1em;
border-radius: .3em;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: #475b62;
}

.token.punctuation {
color: #586e75;
}

.namespace {
opacity: .7;
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
color: #2176c7;
}

.token.boolean {
color: #2176c7;
}

.token.number,
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #259286;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
color: #5662b5;
}

.token.keyword,
.token.atrule,
.token.attr-value {
color: #738a05;
}

.token.function,
.token.regex,
.token.important {
color: #708284;
}

.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}

.token.entity {
cursor: help;
}

pre.line-numbers {
position: relative;
padding-left: 3.8em;
counter-reset: linenumber;
}

pre.line-numbers > code {
position: relative;
}

.line-numbers .line-numbers-rows {
position: absolute;
pointer-events: none;
top: -0.225em;
font-size: 100%;
left: -3.8em;
width: 3em; /* works for line-numbers below 1000 lines */
letter-spacing: -1px;
border-right: 1px solid #999;

-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;

}

.line-numbers-rows > span {
pointer-events: none;
display: block;
counter-increment: linenumber;
}

.line-numbers-rows > span:before {
content: counter(linenumber);
color: #999;
display: block;
padding-right: 0.8em;
text-align: right;
}
pre[class*='language-'] {
position: relative;
}
pre[class*='language-'][data-language]::before {
content: attr(data-language);
color: black;
background-color: #CFCFCF;
display: inline-block;
position: absolute;
top: 0;
right: 0;
font-size: 0.9em;
border-radius: 0 0 0 5px;
padding: 0 0.5em;
text-shadow: none;
}

0 comments on commit 70846ba

Please sign in to comment.