Chevron Shape
by ericbaumann
HTML
<div class="chevron">
<div class="chevron-box">
<span>— BOTTI AT SEA '25 IS FULLY RESERVED —</span>
Join Us for the '26 west coast sailing!
<button>Learn More</button>
</div>
</div>
SCSS
$chev_width: 24em;
@font-face {
font-family: 'Metropolis Black';
src: url("https://bottiatsea.com/wp-content/themes/bootscore-child-main/fonts/Metropolis-Black.otf") format("opentype");
font-weight: normal;
font-style: normal;
}
.chevron-box {
position: relative;
font-family:'Metropolis Black';
padding-top: 10px;
background-color: #6cc9c8;
color: #fff;
width: 90%;
max-width: $chev_width;
margin: 0 auto;
text-align: center;
font-weight:bold;
text-transform: uppercase;
font-size: 1.8em;
display: flex;
flex-direction: column;
align-items: center;
justify-content: flex-end;
box-shadow: 1px 2px 10px #000;
> span {
color: #003bb2;
line-height: 1;
font-weight:normal;
}
button {
background-color: #dd3333;
color: #fff;
font-size: 2cqw;
padding: 5px 10px;
text-transform: uppercase;
border: 0;
font-weight: bold;
z-index: 2;
margin-top: 0em;
margin-bottom: -1em;
}
}
.chevron-box::before {
content: '';
position: absolute;
left: 50%;
bottom: -45px;
transform: translateX(-50%);
border-left: calc(#{$chev_width} / 2) solid transparent;
border-right: calc(#{$chev_width} / 2) solid transparent;
border-top: 40px solid rgba(0, 0, 0, 0.6);
filter: blur(4px);
z-index: -1;
}
.chevron-box::after {
content: '';
position: absolute;
left: 50%;
bottom: -30px;
transform: translateX(-50%);
border-left: calc(#{$chev_width} / 2) solid transparent;
border-right: calc(#{$chev_width} / 2) solid transparent;
border-top: 30px solid #6cc9c8;
}
@media (max-width: 768px) {
$chev_width: 24em;
.chevron-box {
font-size: 3.7cqw;
button{
margin-top:1cqw;
margin-bottom:-2cqw;
}
}
.chevron-box::before,
.chevron-box::after {
border-left: calc(#{$chev_width} / 2) solid transparent;
border-right: calc(#{$chev_width} / 2) solid transparent;
}
}
@media (max-width: 480px) {
$chev_width: 100cqw;
.chevron-box {
...