Skip to content

Commit 2ee82a8

Browse files
committed
New custom theme for prism
1 parent e991663 commit 2ee82a8

File tree

2 files changed

+125
-8
lines changed

2 files changed

+125
-8
lines changed

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: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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.operator,
76+
.token.entity,
77+
.token.url,
78+
.language-css .token.string,
79+
.toke.variable,
80+
.token.inserted {
81+
color: #a9becc;
82+
}
83+
84+
.token.atrule,
85+
.token.attr-name,
86+
.token.keyword,
87+
.token.function {
88+
color: darken(desaturate(getColor(malibu), 30%), 15%);
89+
}
90+
91+
.token.important,
92+
.token.bold {
93+
font-weight: bold;
94+
}
95+
96+
.token.italic {
97+
font-style: italic;
98+
}
99+
100+
.token.entity {
101+
cursor: help;
102+
}
103+
104+
.token.deleted {
105+
color: red;
106+
}

0 commit comments

Comments
 (0)