JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrapper">
<div class="control">
<div class="highlighter"></div>
<input type="text" />
</div>
</div>
CSS
.wrapper {
width: 100%;
height:100%;
background-color: #ccc;
position: absolute;
}
.control {
position: absolute;
width: 100px;
height: 20px;
top: 30px;
left: 300px;
z-index: 1;
}
.highlighter {
background-color: orange;
position: absolute;
width: 100%;
height:100%;
left: -2px;
top: -2px;
padding: 5px 4px;
z-index: -1;
-moz-padding-end: 6px;
}
input {
width: 100%;
height: 100%;
}