JSFiddle - React, Tailwind, and code Playground
HTML
<div class="wrapper">
<div class="button">Button</div>
<div class="content">Content</div>
</div>
CSS
.wrapper {
width: 200px;
height: 300px;
margin: 0 auto;
}
.content {
height: 100%;
padding: 10px;
background: red;
outline: 10px solid red;
}
.button {
border: 1px solid #000;
background: red;
outline: 10px solid red;
color: #fff;
text-align: center;
padding: 10px;
margin-bottom: 10px; /* accounts for the outline */
}
.button:hover {
cursor: pointer;
outline: 10px solid purple;
}
.button:hover + .content {
background: purple;
outline: 10px solid purple;
}