fix polyfills, add ie11 support

This commit is contained in:
Hakim El Hattab
2020-05-26 09:46:50 +02:00
parent b074050a6d
commit e6244a57b5
17 changed files with 129 additions and 142 deletions

View File

@ -1,4 +1,4 @@
import { queryAll, extend, createStyleSheet } from '../utils/util.js'
import { queryAll, extend, createStyleSheet, matchesSelector } from '../utils/util.js'
import { FRAGMENT_STYLE_REGEX } from '../utils/constants.js'
// Counter used to generate unique IDs for auto-animated elements
@ -463,11 +463,11 @@ export default class AutoAnimate {
// Disable scale transformations on text nodes, we transiition
// each individual text property instead
if( pair.from.matches( textNodes ) ) {
if( matchesSelector( pair.from, textNodes ) ) {
pair.options = { scale: false };
}
// Animate individual lines of code
else if( pair.from.matches( codeNodes ) ) {
else if( matchesSelector( pair.from, codeNodes ) ) {
// Transition the code block's width and height instead of scaling
// to prevent its content from being squished