Skip to content

Instantly share code, notes, and snippets.

@kaybutter
Created May 23, 2015 16:06
Show Gist options
  • Save kaybutter/e9a451fdfda10c25a2af to your computer and use it in GitHub Desktop.
Save kaybutter/e9a451fdfda10c25a2af to your computer and use it in GitHub Desktop.
twilight syntax highlighting for swift in jekyll
.highlight { background: #181818; padding: 16px; overflow: auto; line-height: 1.2; border-radius: 0.2em }
.highlight pre { margin: 0}
.highlight code { color: #F8F8F8; font-family: "Source Code Pro", Menlo, monospace; font-size: 70% }
.highlight .hll { background-color: #ffffcc }
.highlight .c { color: #5F5A60; font-style: italic } /* Comment */
.highlight .err { border:#B22518; } /* Error */
.highlight .k { color: #CDA869 } /* Keyword */
.highlight .cm { color: #5F5A60; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #5F5A60 } /* Comment.Preproc */
.highlight .c1 { color: #5F5A60; font-style: italic } /* Comment.Single */
.highlight .cs { color: #5F5A60; font-style: italic } /* Comment.Special */
.highlight .gd { background: #420E09 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { background: #B22518 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { background: #253B22 } /* Generic.Inserted */
.highlight .go { } /* Generic.Output */
.highlight .gp { font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { } /* Generic.Traceback */
.highlight .kc { color: #CDA869; } /* Keyword.Constant */
.highlight .kd { color: #CDA869; } /* Keyword.Declaration */
.highlight .kn { } /* Keyword.Namespace */
.highlight .kp { color: #9B703F } /* Keyword.Pseudo */
.highlight .kr { } /* Keyword.Reserved */
.highlight .kt { color: #9B859D } /* Keyword.Type */
.highlight .m { color: #CF6A4C } /* Literal.Number */
.highlight .s { color: #8F9D6A } /* Literal.String */
.highlight .na { color: #F9EE98 } /* Name.Attribute */
.highlight .nb { color: #CDA869 } /* Name.Builtin */
.highlight .nc { color: #9B859D; font-weight: bold } /* Name.Class */
.highlight .no { color: #9B859D } /* Name.Constant */
.highlight .nd { color: #7587A6 } /* Name.Decorator */
.highlight .ni { color: #CF6A4C; font-weight: bold } /* Name.Entity */
.highlight .nf { color: #e9df8f }
.highlight .nn { color: #9B859D; } /* Name.Namespace */
.highlight .nt { color: #CDA869; } /* Name.Tag */
.highlight .nv { } /* Name.Variable */
.highlight .ow { color: #AA22FF; } /* Operator.Word */
.highlight .w { color: #141414 } /* Text.Whitespace */
.highlight .mf { color: #CF6A4C } /* Literal.Number.Float */
.highlight .mh { color: #CF6A4C } /* Literal.Number.Hex */
.highlight .mi { color: #CF6A4C } /* Literal.Number.Integer */
.highlight .mo { color: #CF6A4C } /* Literal.Number.Oct */
.highlight .sb { color: #8F9D6A } /* Literal.String.Backtick */
.highlight .sc { color: #8F9D6A } /* Literal.String.Char */
.highlight .sd { color: #8F9D6A; } /* Literal.String.Doc */
.highlight .s2 { color: #8F9D6A } /* Literal.String.Double */
.highlight .se { color: #F9EE98; } /* Literal.String.Escape */
.highlight .sh { color: #8F9D6A } /* Literal.String.Heredoc */
.highlight .si { color: #DAEFA3; } /* Literal.String.Interpol */
.highlight .sx { color: #8F9D6A } /* Literal.String.Other */
.highlight .sr { color: #E9C062 } /* Literal.String.Regex */
.highlight .s1 { color: #8F9D6A } /* Literal.String.Single */
.highlight .ss { color: #CF6A4C } /* Literal.String.Symbol */
.highlight .vc { color: #7587A6 } /* Name.Variable.Class */
.highlight .vg { color: #7587A6 } /* Name.Variable.Global */
.highlight .vi { color: #7587A6 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
// some hacks to improve swift highlighting
.highlight .language-swift .kd+.nf,
.highlight .language-swift .kd+.kt { color: inherit; }
.highlight .language-swift .o+.n { color: #7587A6 }
.highlight .language-swift .nv+.o+.n { color: inherit; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment