I'm currently making a contact page in Reactjs. I've added a focus effect and transition to the textarea. The problem is that when I'm resizing the textarea, the transition is also applied to that too, which I don't want.
I've put the transition in textarea:focus
, but the transition doesn't apply when I unfocus on it.
Relevent Code
ContactPage.css
.container input, .container textarea {
background-color: #00000009;
border: none;
border-bottom: 2px solid #e0e0e0;
outline: none;
resize: vertical;
padding: 0px; /* Makes padding even on both sides. */
transition: 0.25s ease-in-out;
width: 100%;
}
.container input:focus {
border-bottom: 2px solid red;
}
.container textarea:focus {
border-bottom: 2px solid red;
}