I am trying to use a small pseudo element to highlight required inputs.
input:required::before {
content: "\2022";
font-size: 32px;
position: absolute;
color: orange;
top: -16px;
left: -4px;
}
The css above will not work, because inputs can't have pseudo elements. I have to put the pseudo elements on a wrapper.
.input-wrapper::before {
...
}
But then the pseudo class :required is not accessible. Is there anyway to achieve pseudo elements on inputs by their pseudo class with pure css? I.e. how to best create pseudo elements on non-container tags by that elements pseudo class?