Mercurial > hg > agora-ahsan
view static/css/code/vibrant.less @ 104:7d753658dc0e
Add line-number alignment for snippet display
Now, the line number lines up with the line itself, even if the line is
longer than the width of the box and even if you zoom in. Since this
change removes the need for the toggle-wordwrap feature, that has been
removed. Also, the line numbers are now right-aligned, and the pre tags
have been removed, allowing for neater indentation in the template file.
(The useful attributes of <pre> are now being applied via CSS.)
There is one minor cosmetic issue: the corners of the snippet display
box look a bit fuzzy when the background of the box is dark. Not quite
sure how to fix it at the moment.
author | dellsystem <ilostwaldo@gmail.com> |
---|---|
date | Tue, 11 Sep 2012 17:42:32 -0400 |
parents | f872c643b056 |
children | 00c71a6192de |
line wrap: on
line source
// Modified version of the vibrant pygments stylesheet .snippet &.vibrant { .highlight { color: @white; background: @almostBlack; } // Comments .c { color: #3A6EF2; font-style: italic; } // Errors .err { color: #A61717; background-color: #E3D2D2; } // Keywords .k { color: @white; font-weight: bold; } // Operator .o { color: @white; font-weight: bold; } // Multi-line comment .cm { color: #3A6EF2; font-style: italic; } // Preprocessor comment .cp { color: #3A6EF2; font-weight: bold; } // Inline comment .c1 { color: #3A6EF2; font-style: italic; } // Special comment .cs { color: #3A6EF2; font-weight: bold; font-style: italic; } // Generic deletion .gd { color: @black; background-color: #FFDDDD; } // Generic deletion (specific) .gd .x { background-color: #FFAAAA; } // Generic emphasis .ge { font-style: italic; } // Generic error .gr { color: #AA0000; } // Generic heading .gh { color: #999999; } // Generic insertion .gi { color: @black; background-color: #DDFFDD; } // Generic insertion (specific) .gi .x { background-color: #AAFFAA; } // Generic output .go { color: #888; } // Generic prompt .gp { color: #555; } // Generic strong .gs { font-weight: bold; } // Generic subheading .gu { font-weight: #AAA; } // Generic traceback .gt { color: #AA0000; } // Keyword.Constant .kc { font-weight: bold; } // Keyword.Declaration .kd { font-weight: bold; } // Keyword.Pseudo .kp { font-weight: bold; } // Keyword.Reserved .kr { font-weight: bold; } // Keyword.Type .kt { color: #445588; font-weight: bold; } // Literal.Number .m { color: #009999; } // Literal.String .s { color: #66FF00; } // Name.Attribute .na { color: #99CC99; } // Name.Builtin .nb { color: #00AA00; } // Name.Class .nc { color: @white; font-weight: bold; } // Name.Constant .no { color: @white; } // Name.Entity .ni { color: #339999; } // Name.Exception .ne { color: #FF0000; font-weight: bold; } // Name.Function .nf { color: #FFCC00; font-weight: bold; } // Name.Namespace .nn { color: #AAA; } // Name.Tag .nt { color: #FF6600; } // Name.Variable .nv { color: #BBB; } // Operator.Word .ow { font-weight: bold; } // Text.Whitespace .w { color: #BBB; } // Literal.Number.Float .mf { color: #CCFF33; } .mh { color: #CCFF33 } /* Literal.Number.Hex */ .mi { color: #CCFF33 } /* Literal.Number.Integer */ .mo { color: #CCFF33 } /* Literal.Number.Oct */ .sb { background: #CCCC33; color: #000000 } /* Literal.String.Backtick */ .sc { color: #66FF00 } /* Literal.String.Char */ .sd { color: #66FF00 } /* Literal.String.Doc */ .s2 { color: #66FF00 } /* Literal.String.Double */ .se { color: #66FF00 } /* Literal.String.Escape */ .sh { color: #66FF00 } /* Literal.String.Heredoc */ .si { color: #d555555 } /* Literal.String.Interpol */ .sx { color: #66FF00 } /* Literal.String.Other */ .sr { color: #009926 } /* Literal.String.Regex */ .s1 { color: #66FF00 } /* Literal.String.Single */ .ss { color: #339999 } /* Literal.String.Symbol */ .bp { color: @lightBlue; font-weight: bold; } /* Name.Builtin.Pseudo */ .vc { color: #008080 } /* Name.Variable.Class */ .vg { color: #008080 } /* Name.Variable.Global */ .vi { color: #008080 } /* Name.Variable.Instance */ .il { color: #009999 } /* Literal.Number.Integer.Long */ }