(s: string)
| 470 | // If comma is not replaced with a dot, the input will be rounded down |
| 471 | // (i.e. acting as a floor function) causing unexpected behaviors |
| 472 | function toMs(s: string): number { |
| 473 | // #8409 default value for CSS durations can be 'auto' |
| 474 | if (s === 'auto') return 0 |
| 475 | return Number(s.slice(0, -1).replace(',', '.')) * 1000 |
| 476 | } |
| 477 | |
| 478 | // synchronously force layout to put elements into a certain state |
| 479 | export function forceReflow(el?: Node): number { |