How can I make it so that on Focus on input to change the background color of text ..? What exactly am I doing wrong? please let me know.. thanks
.parent_div {
background: lightblue;
.child_div {
input {
color: grey;
background: blue;
&:focused {
color: purple;
background: white;
}
&:focused~grand-child-of-parent {
opacity: 0.7;
background: red;
}
}
}
}
<div class="parent_div">
<div class="first_child">
<input type="text" />
</div>
<p class="second_child"> is simply dummy text of the printing and typesetting industry.</p>
</div>