Skip to content

Commit 6b135a8

Browse files
author
Nicholas C. Zakas
committed
More validations fixes (fixes #219)
1 parent a90d8f2 commit 6b135a8

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<project name="csslint" default="build.all">
22

33
<!-- version number -->
4-
<property name="csslint.version" value="0.9.1" />
4+
<property name="csslint.version" value="0.9.2" />
55

66
<!-- the directories containing the source files -->
77
<property name="src.dir" value="./src" />

lib/parserlib.js

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2121
THE SOFTWARE.
2222
2323
*/
24-
/* Version v0.1.2, Build time: 4-January-2012 05:14:28 */
24+
/* Version v0.1.3, Build time: 5-January-2012 09:23:31 */
2525
var parserlib = {};
2626
(function(){
2727

@@ -931,7 +931,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
931931
THE SOFTWARE.
932932
933933
*/
934-
/* Version v0.1.2, Build time: 4-January-2012 05:14:28 */
934+
/* Version v0.1.3, Build time: 5-January-2012 09:23:31 */
935935
(function(){
936936
var EventTarget = parserlib.util.EventTarget,
937937
TokenStreamBase = parserlib.util.TokenStreamBase,
@@ -3450,8 +3450,8 @@ var Properties = {
34503450
"border-bottom-color" : "<color>",
34513451
"border-bottom-left-radius" : { single: "<x-one-radius>", complex: true },
34523452
"border-bottom-right-radius" : { single: "<x-one-radius>", complex: true },
3453-
"border-bottom-style" : "border-style",
3454-
"border-bottom-width" : "border-width",
3453+
"border-bottom-style" : "<border-style>",
3454+
"border-bottom-width" : "<border-width>",
34553455
"border-collapse" : "collapse | separate | inherit",
34563456
"border-color" : { multi: "<color> | inherit", max: 4 },
34573457
"border-image" : 1,
@@ -5917,6 +5917,7 @@ var Validation = {
59175917
//inset? && [ <length>{2,4} && <color>? ]
59185918
var result = false,
59195919
inset = false,
5920+
color = false,
59205921
count = 0,
59215922
part;
59225923

@@ -5929,6 +5930,14 @@ var Validation = {
59295930
inset = true;
59305931
}
59315932

5933+
if (part) {
5934+
if (this["<color>"](part)) {
5935+
expression.next();
5936+
part = expression.peek();
5937+
color = true;
5938+
}
5939+
}
5940+
59325941
while (part && this["<length>"](part) && count < 4) {
59335942
count++;
59345943
expression.next();
@@ -5937,7 +5946,7 @@ var Validation = {
59375946

59385947

59395948
if (part) {
5940-
if (this["<color>"](part)) {
5949+
if (this["<color>"](part) && !color) {
59415950
expression.next();
59425951
part = expression.peek();
59435952
}

0 commit comments

Comments
 (0)