Comments (16)
I have CSS modules
in my project, and just copied all CSS from the module and added :global prefix to each one. I do not have animations nor autoClose working.
from react-toastify.
@emadow I don't have the issue at all. I'm also using chrome and safari latest version. Do you see any things when you open the developer tools ?
from react-toastify.
@fkhadra no errors in the console. Very puzzling.
from react-toastify.
Ack. Seems to be the result of how webpack was dealing with my imports -- the css @keyframes
were not accessible globally.
from react-toastify.
Ow I'm glad you fixed it.
from react-toastify.
@emadow Can you please share your fix? I've stuck with this too.
from react-toastify.
I'm also having this issue
from react-toastify.
I have the same problem as @JustFly1984 , autoclose and animation are not working because I had to put the css rules under :global approach. Does someones have a fiz already?
from react-toastify.
Same problem for me, +1
from react-toastify.
Hello,
It would be nice to reproduce the bug via codesandbox. Anyone know how to do this ?
from react-toastify.
I could, but is it possible to update webpack configuration with codesandbox ?
from react-toastify.
Here the code : https://codesandbox.io/s/z252xzmvrl
CSS for toasts does not work on codesandbox because the webpack.config.js is not used (so the modules are not activated by default for css-loader). I don't know if it is possible to configure webpack on codesandbox...
In my project on my PC, the CSS of the toast box works well, but not the autoclose or animations.
If I remove modules option in css-loader and import globally like in your documentation, autoclose and animations work.
from react-toastify.
from react-toastify.
Me too facing the same issue. Does anyone know how to fix this webpack issue . The progressbar and auto close is not working
from react-toastify.
I was using Next.js with CSS Modules and faced a similar issue. I solved it by tweaking the CSS file as follows:
Initial:
@keyframes Toastify__slideInUp {
from {
transform: translate3d(0, 110%, 0);
visibility: visible;
}
to {
transform: translate3d(0, 0, 0);
}
}
Final (wrapping the animation name with :global()
):
@keyframes :global(Toastify__slideInUp) {
from {
transform: translate3d(0, 110%, 0);
visibility: visible;
}
to {
transform: translate3d(0, 0, 0);
}
}
Source: css-modules#115
I had to manually add :global
to all the keyframes, apart from a common :global
for the other classes. I have made the edited stylesheet with all the :global
's added in this gist so that you don't have to go through the same pain ๐
from react-toastify.
@fkhadra Can you please add this to the documentation? It might be helpful for people using CSS Modules.
from react-toastify.
Related Issues (20)
- Notifications do not render after route change in Next.js 13+ build
- Add generic onOpen and onClose event handles to ToastContainer
- Mixing cjs and esm imports results in duplicated version of the lib because of "exports" setup in "package.json" HOT 2
- Bug: Typo in playground ToastContainer transition prop HOT 1
- Toast Timers Reset on New Toast Addition with newestOnTop/Bottom-Right/useEffect Configuration
- Toaster is not rendered when ToasterContainer is at the root i.e App.tsx
- how i can use this with next js 14 HOT 3
- Toast message is not shown above the daisy UI Modal HOT 1
- When ToastContainer is stacked and position is bottom-x there is problem with the position HOT 1
- Dismissing all toasts in a single container clears all toasts everywhere HOT 1
- Space Between stacked Tooast
- React toast usage error
- Error: export 'useSyncExternalStore' (imported as 'r') was not found in 'react' HOT 2
- Attempted import error: 'isValidElement' is not exported from 'react' (imported as 't'). HOT 3
- Position bottom bug HOT 3
- Hide toast instantly without showing them and add them to notificationcenter HOT 1
- Big image and text not toast HOT 1
- toast.update (unexpectedly) requires container id HOT 1
- The toast message is always success even on error HOT 1
- Bug with render the toast
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-toastify.