mirror of
https://github.com/less/less.js.git
synced 2026-02-05 20:44:58 -05:00
Merge branch 'master' of github.com:cloudhead/less.js
This commit is contained in:
1
Makefile
1
Makefile
@@ -27,6 +27,7 @@ less:
|
||||
@@cat ${HEADER} | sed s/@VERSION/${VERSION}/ > ${DIST}
|
||||
@@echo "(function (window, undefined) {" >> ${DIST}
|
||||
@@cat build/require.js\
|
||||
build/amd.js\
|
||||
build/ecma-5.js\
|
||||
${SRC}/parser.js\
|
||||
${SRC}/functions.js\
|
||||
|
||||
6
build/amd.js
Normal file
6
build/amd.js
Normal file
@@ -0,0 +1,6 @@
|
||||
// amd.js
|
||||
//
|
||||
// Define Less as an AMD module.
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define("less", [], function () { return less; } );
|
||||
}
|
||||
@@ -1255,7 +1255,7 @@ if (less.mode === 'browser' || less.mode === 'rhino') {
|
||||
// Used by `@import` directives
|
||||
//
|
||||
less.Parser.importer = function (path, paths, callback, env) {
|
||||
if (path.charAt(0) !== '/' && paths.length > 0) {
|
||||
if (!/^([a-z]+:)?\//.test(path) && paths.length > 0) {
|
||||
path = paths[0] + path;
|
||||
}
|
||||
// We pass `true` as 3rd argument, to force the reload of the import.
|
||||
|
||||
@@ -162,7 +162,8 @@ tree.Ruleset.prototype = {
|
||||
return p.map(function (s) {
|
||||
return s.toCSS(env);
|
||||
}).join('').trim();
|
||||
}).join(env.compress ? ',' : (paths.length > 3 ? ',\n' : ', '));
|
||||
}).join( env.compress ? ',' : ',\n');
|
||||
|
||||
css.push(selector,
|
||||
(env.compress ? '{' : ' {\n ') +
|
||||
rules.join(env.compress ? '' : '\n ') +
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
color: grey;
|
||||
}
|
||||
*/
|
||||
.selector, .lots, .comments {
|
||||
.selector,
|
||||
.lots,
|
||||
.comments {
|
||||
color: #808080, /* blue */ #ffa500;
|
||||
-webkit-border-radius: 2px /* webkit only */;
|
||||
-moz-border-radius: 8px /* moz only with operation */;
|
||||
|
||||
@@ -25,7 +25,9 @@ ul.comma > li:not(:only-child)::after {
|
||||
ol.comma > li:nth-last-child(2)::after {
|
||||
color: white;
|
||||
}
|
||||
li:nth-child(4n+1), li:nth-child(-5n), li:nth-child(-n+2) {
|
||||
li:nth-child(4n+1),
|
||||
li:nth-child(-5n),
|
||||
li:nth-child(-n+2) {
|
||||
color: white;
|
||||
}
|
||||
a[href^="http://"] {
|
||||
|
||||
@@ -8,7 +8,9 @@ div {
|
||||
* {
|
||||
min-width: 45em;
|
||||
}
|
||||
h1, h2 > a > p, h3 {
|
||||
h1,
|
||||
h2 > a > p,
|
||||
h3 {
|
||||
color: none;
|
||||
}
|
||||
div.class {
|
||||
@@ -33,10 +35,12 @@ div#id {
|
||||
font-family: 'Garamond Pro';
|
||||
src: url("/fonts/garamond-pro.ttf");
|
||||
}
|
||||
a:hover, a:link {
|
||||
a:hover,
|
||||
a:link {
|
||||
color: #999;
|
||||
}
|
||||
p, p:first-child {
|
||||
p,
|
||||
p:first-child {
|
||||
text-transform: none;
|
||||
}
|
||||
q:lang(no) {
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
.class .sub {
|
||||
width: 42;
|
||||
}
|
||||
.top, header > h1 {
|
||||
.top,
|
||||
header > h1 {
|
||||
color: #444444;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,8 @@
|
||||
.direct {
|
||||
border-style: dotted;
|
||||
}
|
||||
.bo, .bar {
|
||||
.bo,
|
||||
.bar {
|
||||
width: 100%;
|
||||
}
|
||||
.bo {
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
#first > .one > #second .two > #deux #third:focus #fifth > #sixth .seventh #eighth + #ninth {
|
||||
color: purple;
|
||||
}
|
||||
#first > .one > #second .two > #deux #fourth, #first > .one > #second .two > #deux #five, #first > .one > #second .two > #deux #six {
|
||||
#first > .one > #second .two > #deux #fourth,
|
||||
#first > .one > #second .two > #deux #five,
|
||||
#first > .one > #second .two > #deux #six {
|
||||
color: #110000;
|
||||
}
|
||||
#first > .one > #second .two > #deux #fourth .seven,
|
||||
@@ -24,6 +26,8 @@
|
||||
#first > .one > #second .two > #deux #six .eight > #nine {
|
||||
border: 1px solid black;
|
||||
}
|
||||
#first > .one > #second .two > #deux #fourth #ten, #first > .one > #second .two > #deux #five #ten, #first > .one > #second .two > #deux #six #ten {
|
||||
#first > .one > #second .two > #deux #fourth #ten,
|
||||
#first > .one > #second .two > #deux #five #ten,
|
||||
#first > .one > #second .two > #deux #six #ten {
|
||||
color: red;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,8 @@ td {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
td, input {
|
||||
td,
|
||||
input {
|
||||
line-height: 1em;
|
||||
}
|
||||
a {
|
||||
@@ -42,12 +43,15 @@ div a {
|
||||
p a span {
|
||||
color: yellow;
|
||||
}
|
||||
.foo .bar .qux, .foo .baz .qux {
|
||||
.foo .bar .qux,
|
||||
.foo .baz .qux {
|
||||
display: block;
|
||||
}
|
||||
.qux .foo .bar, .qux .foo .baz {
|
||||
.qux .foo .bar,
|
||||
.qux .foo .baz {
|
||||
display: inline;
|
||||
}
|
||||
.qux .foo .bar .biz, .qux .foo .baz .biz {
|
||||
.qux .foo .bar .biz,
|
||||
.qux .foo .baz .biz {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
.whitespace {
|
||||
color: white ;
|
||||
}
|
||||
.white, .space, .mania {
|
||||
.white,
|
||||
.space,
|
||||
.mania {
|
||||
color: white;
|
||||
}
|
||||
.no-semi-column {
|
||||
|
||||
Reference in New Issue
Block a user