JSFiddle - React, Tailwind, and code Playground
HTML
<div class="block">
<div class="bloc__price">25$/mo.</div>
<ul class="block__list">
<li>Some text</li>
<li>Some text</li>
<li>Some text</li>
<li>Some text</li>
<li>Some text</li>
<li>Some text</li>
</ul>
<button class="block__submit-button">Buy now</button>
<div class="block__heading">Basic</div>
</div>
SCSS
.block {
display: flex;
flex-direction: column;
width: 200px;
height: auto;
margin: 0 auto;
padding: 0;
background: lightgray;
text-align: center;
* {
box-sizing: border-box;
}
}
.block__heading {
padding: 10px;
background: black;
color: white;
font-size: 20px;
order: 0;
}
.bloc__price {
padding: 10px;
order: 1;
}
.block__list {
background: white;
padding: 0;
margin: 0;
order: 2;
li {
list-style-type: none;
padding: 8px 0;
border-bottom: 1px solid lightgray;
&:last-child {
border-bottom: 0;
}
}
}
.block__submit-button {
display: inline-block;
align-self: center;
padding: 5px;
margin: 10px 0;
outline: 0;
border: 0;
border-radius: 4px;
background: black;
color: white;
font-size: 14px;
cursor: pointer;
order: 3;
&:hover {
background: lighten(black, 35%);
+ .block__heading {
background: lighten(black, 35%);
}
}
}