Skip to content

Commit e365a61

Browse files
committed
Merge pull request #122 from mattiacci/will-change
Add support for will-change
2 parents 6a896f8 + ca6be03 commit e365a61

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/css/Properties.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ var Properties = {
517517
"white-space-collapse" : 1,
518518
"widows" : "<integer> | inherit",
519519
"width" : "<length> | <percentage> | <content-sizing> | auto | inherit",
520+
"will-change" : { multi: "<ident>", comma: true },
520521
"word-break" : "normal | keep-all | break-all",
521522
"word-spacing" : "<length> | normal | inherit",
522523
"word-wrap" : "normal | break-word",

tests/css/Validation.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -932,6 +932,25 @@
932932
}
933933
}));
934934

935+
suite.add(new ValidationTestCase({
936+
property: "will-change",
937+
938+
valid: [
939+
"auto",
940+
"scroll-position",
941+
"contents",
942+
"opacity",
943+
"transform",
944+
"opacity, transform",
945+
"height, opacity, transform, width"
946+
],
947+
948+
invalid: {
949+
"2px" : "Expected (<ident>) but found '2px'.",
950+
"opacity transform" : "Expected end of value but found 'transform'."
951+
}
952+
}));
953+
935954
suite.add(new ValidationTestCase({
936955
property: "word-wrap",
937956

0 commit comments

Comments
 (0)