question. I want the input element here to be without any style when he is empty and not get style from the in-range selector, like he is "in-range"...
how can I do this? What I need do that the input will not get style here? Here is the code:
li {
list-style: none;
margin-bottom: 1em;
}
input {
border: 1px solid black;
}
input:in-range {
background-color: rgba(251, 255, 0, 0.815);
}
input:out-of-range {
background-color: rgba(255, 0, 0, 0.25);
border: 2px solid red;
}
input:in-range + label::after {
content: 'okay.';
}
input:out-of-range + label::after {
content: 'out of range!';
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF8">
<title>Practice vsc</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<ul>Values between 1 and 10 are valid.
<li>
<input id="value1" name="value1" type="number" placeholder="1 to 10" min="1" max="10" value="12">
<label for="value1">Your value is </label>
</li>
</ul>
</body>
</html>