Skip to main content

time-min-milliseconds

限制时间值的最小毫秒数。

¥Limit the minimum number of milliseconds for time values.

a { animation: slip-n-slide 150ms linear; }
/** ↑

* This time */

此规则检查 transition-durationtransition-delayanimation-durationanimation-delay 中的正数以及 transitionanimation 简写中显示的时间。

¥This rule checks positive numbers in transition-duration, transition-delay, animation-duration, animation-delay, and those times as they manifest in the transition and animation shorthands.

message 次要选项 可以接受该规则的参数。

¥The message secondary option can accept the arguments of this rule.

选项

¥Options

number

指定时间值的最小毫秒数。

¥Specify a minimum number of milliseconds for time values.

鉴于:

¥Given:

{
"time-min-milliseconds": 100
}

以下模式被视为问题:

¥The following patterns are considered problems:

a { animation: 80ms; }
a { transition-duration: 0.08s; }
a { transition: background-color 6ms linear; }
a { animation-delay: 0.01s; }

以下模式不被视为问题:

¥The following patterns are not considered problems:

a { animation: 8s; }
a { transition-duration: 0.8s; }
a { transition: background-color 600ms linear; }
a { animation-delay: 1s; }

可选的辅助选项

¥Optional secondary options

ignore

{ "ignore": ["array", "of", "options"] }

"delay"

忽略动画或转场延迟的时间值。

¥Ignore time values for an animation or transition delay.

鉴于:

¥Given:

{
"time-min-milliseconds": [200, { "ignore": ["delay"] }]
}

以下模式不被视为问题:

¥The following pattern is not considered a problem:

a { animation-delay: 100ms; }