Skip to content

Commit bd59bd7

Browse files
authored
Merge pull request #433 from pastelsky/new-prism-theme
New dark prism theme
2 parents e0e3b52 + 90cb285 commit bd59bd7

File tree

3 files changed

+162
-8
lines changed

3 files changed

+162
-8
lines changed

styles/index.scss

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,40 @@ a {
4646
}
4747
}
4848

49+
details:focus, summary:focus{
50+
outline: none;
51+
background: rgba(255,255,255,0.03);
52+
border-radius: 2px;
53+
}
54+
55+
@media screen and (-webkit-min-device-pixel-ratio:0) {
56+
/* Style details arrow if on webkit */
57+
58+
details summary::-webkit-details-marker {
59+
color: getColor(malibu);
60+
}
61+
62+
summary::-webkit-details-marker {
63+
display: none
64+
}
65+
summary:after {
66+
content: "\F103";
67+
float: left;
68+
position: relative;
69+
left: -2px;
70+
text-align: center;
71+
font-family: icons;
72+
color: lighten(getColor(denim), 10%)
73+
}
74+
75+
details[open] summary:after {
76+
content: "\F101";
77+
font-family: icons;
78+
}
79+
}
80+
81+
82+
4983
::selection {
5084
background: transparentize(getColor(malibu), 0.65);
5185
}

styles/markdown.scss

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
// Markdown styling is based on https://gist.github.com/tuzz/3331384.
2-
32
@import 'vars';
43
@import 'functions';
5-
@import '~prismjs/themes/prism-funky';
4+
@import 'prism-theme';
65

76
.page__content,
87
.splash__section {
@@ -166,31 +165,43 @@
166165
white-space: nowrap;
167166
background-color: transparentize(getColor(fiord), 0.94);
168167
border-radius: 3px;
169-
text-shadow: 0 1px 0 transparentize(getColor(white), 0.5);
170-
color: getColor(elephant);
168+
text-shadow: 0 1px 0 transparentize(getColor(white), 0.4);
171169
}
172170

173171
pre {
174-
background-color:getColor(mine-shaft);
172+
background-color: rgba(238, 238, 238, 0.35);
173+
background-color: getColor(elephant);
175174
font-size: 13px;
176175
line-height: 19px;
177176
overflow: auto;
178-
padding: 6px 10px;
177+
padding: 8px 16px;
179178
border-radius: 3px;
180179

181180
code {
182181
margin: 0;
183182
padding: 0;
184183
white-space: pre;
185184
border: none;
186-
color:getColor(concrete);
187185
background: transparent;
188-
text-shadow: none;
186+
text-shadow: 0 1px 0 transparentize(darken(getColor(elephant), 10%), 0.5);
187+
color: desaturate(getColor(malibu), 40%);
189188

190189
.code-details-summary-span {
191190
margin-left: -15px;
192191
cursor: pointer;
193192
}
193+
194+
a {
195+
border-bottom: 1px dotted getColor(denim);
196+
}
197+
198+
.code-link {
199+
position: relative;
200+
201+
&:hover {
202+
color: lighten(getColor(denim), 15%);
203+
}
204+
}
194205
}
195206

196207
code, tt {

styles/prism-theme.scss

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
@import 'functions';
2+
3+
code[class*="lang-"],
4+
pre[class*="lang-"] {
5+
text-align: left;
6+
white-space: pre;
7+
word-spacing: normal;
8+
word-break: normal;
9+
word-wrap: normal;
10+
line-height: 1.5;
11+
tab-size: 4;
12+
hyphens: none;
13+
//color: getColor(fiord);
14+
color: desaturate(getColor(malibu), 40%);
15+
16+
a {
17+
color: inherit;
18+
}
19+
}
20+
21+
/* Code blocks */
22+
pre[class*="lang-"] {
23+
padding: .4em .8em;
24+
margin: .5em 0;
25+
overflow: auto;
26+
//background-color: rgba(238,238,238,0.35);
27+
background-color: getColor(elephant);
28+
}
29+
30+
/* Inline code */
31+
:not(pre) > code[class*="lang-"] {
32+
padding: .2em;
33+
border-radius: .3em;
34+
box-shadow: none;
35+
white-space: normal;
36+
}
37+
38+
.token.comment,
39+
.token.prolog,
40+
.token.doctype,
41+
.token.cdata {
42+
color: #77858c;
43+
}
44+
45+
.token.punctuation {
46+
color: #e1e6e9;
47+
}
48+
49+
.namespace {
50+
opacity: .7;
51+
}
52+
53+
.token.function{
54+
}
55+
56+
.token.property,
57+
.token.tag,
58+
.token.boolean,
59+
.token.number,
60+
.token.constant,
61+
.token.symbol {
62+
color: desaturate(darken(getColor(malibu), 15%), 15%);
63+
}
64+
65+
.token.selector,
66+
.token.string,
67+
.token.char,
68+
.token.builtin,
69+
.token.regex,
70+
.token.attr-value,
71+
.token.important {
72+
color: desaturate(#2dd271, 25%)
73+
}
74+
75+
.token.inserted {
76+
color: #9df29d;
77+
}
78+
79+
.token.deleted {
80+
color: #f79494;
81+
}
82+
83+
.token.operator,
84+
.token.entity,
85+
.token.url,
86+
.language-css .token.string,
87+
.toke.variable {
88+
color: #a9becc;
89+
}
90+
91+
.token.atrule,
92+
.token.attr-name,
93+
.token.keyword,
94+
.token.function {
95+
color: darken(desaturate(getColor(malibu), 30%), 15%);
96+
}
97+
98+
.token.important,
99+
.token.bold {
100+
font-weight: bold;
101+
}
102+
103+
.token.italic {
104+
font-style: italic;
105+
}
106+
107+
.token.entity {
108+
cursor: help;
109+
}

0 commit comments

Comments
 (0)