yiminghe / css-animation Goto Github PK
View Code? Open in Web Editor NEWmake css animation easier
License: MIT License
make css animation easier
License: MIT License
Hi,
One of the module on my app uses your module but I get the document is not defined
error when webpack build my app.
The issue comes from here
I simply added a typeof document !== 'undefined'
check on document but I don't know if there is any side effects ?
When finding the transition duration, this library should sum the duration and the delay here: https://github.com/yiminghe/css-animation/blob/master/src/index.js#L27
I'm experiencing the following error with 1.6.0 while doing a production build with webpack, reverting to 1.5.0 fixes the problem.
=============
Failed to compile.
./node_modules/antd/es/_util/wave.js
Cannot find module: 'css-animation/es/Event'. Make sure this package is installed.
You can install this package by running: npm install css-animation/es/Event.
To mitigate the issue I added the following to my package.json
"resolutions": {
"css-animation": "1.5.0"
}
你好,我是一个刚开始从事前端的小白,最近在学习你的css-animation这个源码,收益匪浅。
想请教4个问题,希望大佬百忙之中可以看到:
1、index.js的
node.rcAnimTimeout = setTimeout(() => {
。。。
// 30ms for firefox
}, 30);
这一块,不是很懂,为什么是30ms后,给DOM加上'XXX-active'的样式,且注释是30ms for 火狐,而不是在下一帧requestAnimationFrame时加上'XXX-active'这个样式呢
2、为什么if(active),需要setTimeout(active, 0);再执行active函数,而不是和start一样立即执行呢?
3、Event.addEndEventListener(node, node.rcEndListener);添加了监听过渡或动画结束的事件,
为什么还需要执行fixBrowserByTimeout(node);用定时器来实现过渡或动画的时间呢?兼容animation/transition不是应该就可以兼容animationend/transitionend了吗,是什么浏览器会不兼容吗
4、fixBrowserByTimeout在计算过渡或动画时间设置的定时器,(time) * 1000 + 200,为什么需要加200ms呢
非常感谢!
hi the recent 1.4.0 release added the "module" field in package.json but now when css-animation is a dependency of a create-react-app project the build fails with
'css-animation' does not contain an export named 'isCssAnimationSupported'.
the issue is that isCssAnimationSupported is exported as a field of the default export
i don't know why but before the package.json modification the following import worked
{isCssAnimationSupported} from "css-animation"
is possible to add the named export:
export isCssAnimationSupported
to be backward compatible?
tnx
Hi and thanks for your great work on this project. 👏
Is there any way you could replace the component-classes
dependency with something else? It's causing a lot of headaches for me due to component/classes#31 and their conditional requires. There hasn't been any activity over there for more than two years - it is unmaintained.
On a related note, since those require()
s are to support IE, what do you think of dropping IE support and just using classList?
var Event = require('./event');
var Css = require('./css');
文件实际上是 Event.js
和 Css.js
。
会导致 webpack 报错。
I have saw the usage there but it's too simple to understand how it works. can you provide some specific code? (have check the online example, but I want check the code of the example.
Seems not required by src
codes.
https://docs.npmjs.com/files/package.json#license
The property licenses
should be license
at https://github.com/yiminghe/css-animation/blob/master/package.json#L17
Hi!
I've been using rc-slider
package, and I got following error
./node_modules/rc-animate/es/AnimateChild.js
76:11-34 'css-animation' does not contain an export named 'isCssAnimationSupported'.
As listed in npm list
command, it uses internally Your package
├─┬ [email protected]
│ ├── [email protected]
│ ├─┬ [email protected]
│ │ └─┬ [email protected]
│ │ ├─┬ [email protected]
│ │ └── [email protected]
│ │ └─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └─┬ [email protected]
│ │ └── [email protected]
Code worked on version 1.3.2
and stopped working on version 1.4.0
In rc-animate
package, import from css-animation
looks like this:
import cssAnimate, { isCssAnimationSupported } from 'css-animation';
Did something change in the API?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.