I am trying to style the react-toastify
toast container:
<ToastContainer style={{width: "30%"}} className="toast"
position="top-center"
etc.
/>
Here is the SCSS:
.toast {
width: 30%; // affects the text, not the container
font-size: 2rem;
text-align: center;
& img {
width: 3rem; // no effect
}
}
width: 30%
in the style attribute works as expected, i.e. sets the width of the container. Why does the same property in the class affect the text, i.e. makes the text narrow?
The styling of img
is an attempt to make the icon larger. I suspect that this attempt fails because the icon is a character, not an image. However, I could not find how to set it's font size. Any ideas?
Edit: Here is what I see in the element explorer: