Add LESS syntax highlighting.

This commit is contained in:
John Roepke 2012-04-05 21:18:09 +00:00
commit 74daa182e9
4 changed files with 399 additions and 0 deletions

View file

@ -97,6 +97,7 @@ var modes = [
new Mode("javascript", "JavaScript", ["js"]),
new Mode("json", "JSON", ["json"]),
new Mode("latex", "LaTeX", ["tex"]),
new Mode("less", "LESS", ["less"]),
new Mode("lua", "Lua", ["lua"]),
new Mode("liquid", "Liquid", ["liquid"]),
new Mode("markdown", "Markdown", ["md", "markdown"]),
@ -150,6 +151,10 @@ var docs = [
"scss", "SCSS",
require("ace/requirejs/text!./docs/scss.scss")
),
new Doc(
"less", "LESS",
require("ace/requirejs/text!./docs/less.less")
),
new Doc(
"html", "HTML",
require("ace/requirejs/text!./docs/html.html")

View file

@ -0,0 +1,28 @@
/* styles.less */
@base: #f938ab;
.box-shadow(@style, @c) when (iscolor(@c)) {
box-shadow: @style @c;
-webkit-box-shadow: @style @c;
-moz-box-shadow: @style @c;
}
.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
.box-shadow(@style, rgba(0, 0, 0, @alpha));
}
// Box styles
.box {
color: saturate(@base, 5%);
border-color: lighten(@base, 30%);
div { .box-shadow(0 0 5px, 30%) }
a {
color: @base;
&:hover {
color: lighten(@base, 50%);
}
}
}