Merge pull request #707 from justjohn/master

LESS syntax highlighting support
This commit is contained in:
Fabian Jakobs 2012-04-12 05:11:22 -07:00
commit d020cf0e66
4 changed files with 399 additions and 0 deletions

View file

@ -96,6 +96,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"]),
@ -149,6 +150,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%);
}
}
}