Skip to content

Commit

Permalink
Improve syntax highlighting
Browse files Browse the repository at this point in the history
I've added improved support for syntax highlighting. It's definitely
still more minimal than something like Solarized, but I feel it is
a better fit for the Pixyll aesthetic.

Closes johno#195
  • Loading branch information
johno committed Aug 24, 2015
1 parent 0c697d9 commit b14716e
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 2 deletions.
20 changes: 20 additions & 0 deletions _posts/2014-06-10-see-pixyll-in-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,26 @@ Here's some CSS:
}
{% endhighlight %}

Here's some JavaScript:

{% highlight js %}
var isPresent = require('is-present')

module.exports = function doStuff(things) {
if (isPresent(things)) {
doOtherStuff(things)
}
}
{% endhighlight %}

Here's some HTML:

{% highlight html %}
<div class="m0 p0 bg-blue white">
<h3 class="h1">Hello, world!</h3>
</div>
{% endhighlight %}

# Headings!

They're responsive, and well-proportioned (in `padding`, `line-height`, `margin`, and `font-size`).
Expand Down
3 changes: 2 additions & 1 deletion _sass/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ $form-field-padding-x: .5rem;
$pre-border-radius: 0;
$pre-background-color: #fafafa;
$hljs-comment: $mid-gray;
$hljs-keyword: $dark-gray;
$hljs-keyword: $dark-blue;
$hljs-name: $dark-gray;
$hljs-number: $dark-green;
$hljs-string: $red;
$hljs-title: $red;
Expand Down
37 changes: 36 additions & 1 deletion _sass/basscss/_syntax-highlighting.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,55 @@
-webkit-text-size-adjust: none;
}

.highlight .c,
.highlight .cs,
.highlight .cm,
.highlight .cp,
.highlight .c1 {
color: $hljs-comment;
font-style: italic;
}

.highlight .k,
.highlight .kc,
.highlight .kd,
.highlight .kn,
.highlight .kr,
.highlight .kt,
.highlight .kp {
color: $hljs-keyword;
}

.highlight .mi {
.highlight .na,
.highlight .nb,
.highlight .nc,
.highlight .no,
.highlight .nd,
.highlight .ni,
.highlight .ne,
.highlight .nf,
.highlight .nl,
.highlight .nn,
.highlight .nx {
color: $hljs-name;
}

.highlight .mi,
.highlight .il {
color: $hljs-number;
}

.highlight .s,
.highlight .sb,
.highlight .sc,
.highlight .sd,
.highlight .s2,
.highlight .s3,
.highlight .sh,
.highlight .si,
.highlight .sx,
.highlight .sr,
.highlight .ss,
.highlight .s1 {
color: $hljs-string;
}
Expand Down

0 comments on commit b14716e

Please sign in to comment.