update to fix infinity capitalization. only do css logic on valid duration. set any duration of less than zero to window.Infinity