Skip to content

Commit 7a2eeb2

Browse files
committed
Merge pull request #211 from mattiacci/master
Update animation-direction by adding <single-animation-direction>
2 parents 5468413 + 93e6a36 commit 7a2eeb2

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

src/css/Properties.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var Properties = module.exports = {
1616
"alignment-baseline" : "auto | baseline | use-script | before-edge | text-before-edge | after-edge | text-after-edge | central | middle | ideographic | alphabetic | hanging | mathematical",
1717
"animation" : 1,
1818
"animation-delay" : "<time>#",
19-
"animation-direction" : "[ normal | alternate ]#",
19+
"animation-direction" : "<single-animation-direction>#",
2020
"animation-duration" : "<time>#",
2121
"animation-fill-mode" : "[ none | forwards | backwards | both ]#",
2222
"animation-iteration-count" : "[ <number> | infinite ]#",

src/css/ValidationTypes.js

+3
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,9 @@ copy(ValidationTypes, {
282282

283283
"<shape-box>": "<box> | margin-box",
284284

285+
"<single-animation-direction>":
286+
"normal | reverse | alternate | alternate-reverse",
287+
285288
"<single-animation-name>": function(part) {
286289
return this["<ident>"](part) &&
287290
/^-?[a-z_][-a-z0-9_]+$/i.test(part) &&

tests/css/Validation.js

+16
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,22 @@ var YUITest = require("yuitest"),
8383

8484
var suite = new YUITest.TestSuite("Validation Tests");
8585

86+
suite.add(new ValidationTestCase({
87+
property: "animation-direction",
88+
89+
valid: [
90+
"normal",
91+
"reverse",
92+
"alternate",
93+
"alternate-reverse",
94+
"alternate, reverse, normal",
95+
],
96+
97+
invalid: {
98+
"1px" : "Expected (<single-animation-direction>#) but found '1px'."
99+
}
100+
}));
101+
86102
suite.add(new ValidationTestCase({
87103
property: "animation-fill-mode",
88104

0 commit comments

Comments
 (0)