Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
Update the prism theme (more accurate twilight colouring)
Browse files Browse the repository at this point in the history
  • Loading branch information
Remy Bach committed Nov 14, 2012
1 parent 7c73b0b commit eabbeeb
Showing 1 changed file with 29 additions and 27 deletions.
56 changes: 29 additions & 27 deletions demo/css/prism.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,29 @@ pre[class*="language-"] {

pre[class*="language-"],
:not(pre) > code[class*="language-"] {
background:hsl(0,0%,22%);
background:hsl(0, 0%, 8%); /* #141414 */
}

/* Code blocks */
pre[class*="language-"] {
border-radius: .5em;
border: .3em solid hsl(0,0%,33%);
border: .3em solid hsl(0,0%,33%); /* #282A2B */
box-shadow: 1px 1px .5em black inset;
margin: .5em 0;
overflow: auto;
padding: 1em;
}
pre[class*="language-"]::selection { /* Safari */
background:hsl(200, 4%, 16%); /* #282A2B */
}
pre[class*="language-"]::selection { /* Firefox */
background:hsl(200, 4%, 16%); /* #282A2B */
}

/* Inline code */
:not(pre) > code[class*="language-"] {
border-radius: .3em;
border: .13em solid hsl(0,0%,33%);
border: .13em solid hsl(0,0%,33%); /* #545454 */
box-shadow: 1px 1px .3em -.1em black inset;
padding: .15em .2em .05em;
}
Expand All @@ -50,7 +56,7 @@ pre[class*="language-"] {
.token.prolog,
.token.doctype,
.token.cdata {
color: hsl(0,0%,47%);
color: hsl(0, 0%, 47%); /* #777777 */
}

.token.punctuation {
Expand All @@ -64,33 +70,32 @@ pre[class*="language-"] {
.token.tag,
.token.boolean,
.token.number {
color: hsl(15, 60%, 61%);
color: hsl(14, 58%, 55%); /* #CF6A4C */
}

.token.keyword,
.token.property,
.token.selector {
color:hsl(53, 89%, 79%);
color:hsl(53, 89%, 79%); /* #F9EE98 */
}
.token.attr-name,
.token.attr-value,
.token.string,
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color:hsl(76, 21%, 52%);
color:hsl(76, 21%, 52%); /* #8F9D6A */
}

.token.atrule,
.token.attr-value {
color: hsl(32, 33%, 50%);
.token.atrule {
color:hsl(218, 22%, 55%); /* #7587A6 */
}


.token.regex,
.token.important {
color: hsl(42, 75%, 65%);
color: hsl(42, 75%, 65%); /* #E9C062 */
}

.token.important {
Expand All @@ -109,18 +114,15 @@ pre[data-line] {
.language-markup .token.tag,
.language-markup .token.attr-name,
.language-markup .token.punctuation {
color: hsl(38, 50%, 61%);
}
.language-markup .token.attr-value {
color: hsl(76, 21%, 52%);
color: hsl(33, 33%, 52%); /* #AC885B */
}

/* Text Selection colour */
::selection {
background: hsla(0,0%,93%,0.15);
background: hsla(0,0%,93%,0.15); /* #EDEDED */
}
::-moz-selection {
background: hsla(0,0%,93%,0.15);
background: hsla(0,0%,93%,0.15); /* #EDEDED */
}

/* Make the tokens sit above the line highlight so the colours don't look faded. */
Expand All @@ -129,13 +131,13 @@ pre[data-line] {
z-index:1;
}
.line-highlight {
background: -moz-linear-gradient(left, hsl(0, 0%, 33%,.1) 70%, hsl(0, 0%, 33%,0));
background: -o-linear-gradient(left, hsl(0, 0%, 33%,.1) 70%, hsl(0, 0%, 33%,0));
background: -webkit-linear-gradient(left, hsl(0, 0%, 33%,.1) 70%, hsl(0, 0%, 33%,0));
background: hsla(0, 0%, 33%, 0.25);
background: linear-gradient(left, hsl(0, 0%, 33%,.1) 70%, hsl(0, 0%, 33%,0));
border-bottom:1px dashed hsl(0, 0%, 33%);
border-top:1px dashed hsl(0, 0%, 33%);
background: -moz-linear-gradient(left, hsl(0, 0%, 33%,.1) 70%, hsl(0, 0%, 33%,0)); /* #545454 */
background: -o-linear-gradient(left, hsl(0, 0%, 33%,.1) 70%, hsl(0, 0%, 33%,0)); /* #545454 */
background: -webkit-linear-gradient(left, hsl(0, 0%, 33%,.1) 70%, hsl(0, 0%, 33%,0)); /* #545454 */
background: hsla(0, 0%, 33%, 0.25); /* #545454 */
background: linear-gradient(left, hsl(0, 0%, 33%,.1) 70%, hsl(0, 0%, 33%,0)); /* #545454 */
border-bottom:1px dashed hsl(0, 0%, 33%); /* #545454 */
border-top:1px dashed hsl(0, 0%, 33%); /* #545454 */
left: 0;
line-height: inherit;
margin-top: 0.75em; /* Same as .prism’s padding-top */
Expand All @@ -148,10 +150,10 @@ pre[data-line] {
}
.line-highlight:before,
.line-highlight[data-end]:after {
background-color: hsl(215, 15%, 59%);
background-color: hsl(215, 15%, 59%); /* #8794A6 */
border-radius: 999px;
box-shadow: 0 1px white;
color: hsl(24, 20%, 95%);
color: hsl(24, 20%, 95%); /* #F5F2F0 */
content: attr(data-start);
font: bold 65%/1.5 sans-serif;
left: .6em;
Expand Down

0 comments on commit eabbeeb

Please sign in to comment.