CSSLint: CSS Timing Functions Level 1 (WD & ED 2017)

WD 2017-02-21 https://www.w3.org/TR/css-timing-1/
ED 2017-12-03 https://drafts.csswg.org/css-timing/
This commit is contained in:
tophf 2017-12-26 12:44:09 +03:00
parent 6e0cb2bc86
commit b6f0b4a44f

View File

@ -3861,11 +3861,11 @@ var Properties = module.exports = {
"transform-box" : "border-box | fill-box | view-box",
"transform-origin" : "<transform-origin>",
"transform-style" : "auto | flat | preserve-3d",
"transition" : 1,
"transition-delay" : 1,
"transition-duration" : 1,
"transition-property" : 1,
"transition-timing-function" : 1,
"transition" : "<transition>#",
"transition-delay" : "<time>#",
"transition-duration" : "<time>#",
"transition-property" : "none | [ all | <ident> ]#",
"transition-timing-function" : "<single-timing-function>#",
"translate" : "none | <length-percentage> [ <length-percentage> <length>? ]?",
//U
@ -6197,6 +6197,16 @@ copy(ValidationTypes, {
"min-content | -moz-min-content | -webkit-min-content | " +
"fit-content | -moz-fit-content | -webkit-fit-content",
"<cubic-bezier>": function(part) {
return part.type === 'function' &&
/^cubic-bezier$/i.test(part.name) &&
part.expr && part.expr.parts.length === 7 &&
part.expr.parts.every((p, i) => i % 2 ? p.text === ',' : this['<number>'](p));
},
"<cubic-bezier-timing-function>":
"ease | ease-in | ease-out | ease-in-out | <cubic-bezier>",
"<feature-tag-value>": function(part) {
return part.type === "function" && /^[A-Z0-9]{4}$/i.test(part);
},
@ -6241,6 +6251,13 @@ copy(ValidationTypes, {
"normal | bold | bolder | lighter | " +
"100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900",
"<frames-timing-function>": function({type, name, expr}) {
return type === 'function' &&
/^frames$/i.test(name) &&
expr.parts.length === 1 &&
this['<integer>'](expr.parts[0]);
},
"<generic-family>":
"serif | sans-serif | cursive | fantasy | monospace",
@ -6346,6 +6363,19 @@ copy(ValidationTypes, {
!/^(none|unset|initial|inherit)$/i.test(part);
},
"<step-timing-function>": "step-start | step-end | <steps>",
"<steps>": function({type, name, expr}) {
return type === 'function' &&
/^steps$/i.test(name) &&
expr.parts.length &&
this['<integer>'](expr.parts[0]) && (expr.parts.length === 1 ||
expr.parts.length === 3 &&
expr.parts[1].text === ',' &&
/^(start|end)$/i.test(expr.parts[2])
);
},
"<string>": function(part) {
return part.type === "string";
},
@ -6551,6 +6581,9 @@ copy(ValidationTypes, {
Matcher.many([true /* length is required */],
Matcher.cast("<length>").braces(2, 4), "inset", "<color>"),
"<single-timing-function>":
"linear | <cubic-bezier-timing-function> | <step-timing-function> | <frames-timing-function>",
"<text-decoration-color>":
"<color>",
@ -6565,6 +6598,9 @@ copy(ValidationTypes, {
"[ left | center | right | top | bottom | <length-percentage> ] | " +
"[ [ center | left | right ] && [ center | top | bottom ] ] <length>?",
"<transition>":
"[ none | [ all | <ident> ]# ] || <time> || <single-timing-function> || <time>",
"<will-change>":
"auto | <animateable-feature>#",