I want to use Tobias Ahlin's script to style up my input-box. But while it's perfectly working on paragraphs, on inputs doesn't. Also, the ::before doesn't show up in the spectator.
Here's my code:
.edit input {
text-decoration: none;
outline: none;
border: none;
position: relative;
font-size: 1.125rem;
}
.edit input::before {
content: "";
position: absolute;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
background-color: #000;
visibility: hidden;
transform: scaleX(0);
transition: all 0.15s ease-in-out 0s;
}
.edit input:active::before, .edit input:focus::before {
visibility: visible;
transform: scaleX(1);
}
<div class="edit">
<input type="text" maxlength="15" value="Some content here...">
</div>
I'm using it in an Angular 5 application, but I don't think it's relevant right now.