Cut-corner gradient button
Uppercase button with a dark-to-green gradient and its bottom-right corner cut off by clip-path; the padding widens on hover.
<button>
GET STARTED
</button>button {
border-radius: .25rem;
text-transform: uppercase;
font-style: normal;
font-weight: 400;
padding-left: 25px;
padding-right: 25px;
color: #fff;
-webkit-clip-path: polygon(0 0,0 0,100% 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,15px 100%,0 100%);
clip-path: polygon(0 0,0 0,100% 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,15px 100%,0 100%);
height: 40px;
font-size: 0.7rem;
line-height: 14px;
letter-spacing: 1.2px;
transition: .2s .1s;
background-image: linear-gradient(90deg,#1c1c1c,#10b981);
border: 0 solid;
overflow: hidden;
}
button:hover {
cursor: pointer;
transition: all .3s ease-in;
padding-right: 30px;
padding-left: 30px;
}<!--
title: Cut-corner gradient button
tags: [button, gradient, clip-path, uppercase, hover]
description: Uppercase button with a dark-to-green gradient and its bottom-right corner cut off by clip-path; the padding widens on hover.
-->
<button>
GET STARTED
</button>
<style>
button {
border-radius: .25rem;
text-transform: uppercase;
font-style: normal;
font-weight: 400;
padding-left: 25px;
padding-right: 25px;
color: #fff;
-webkit-clip-path: polygon(0 0,0 0,100% 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,15px 100%,0 100%);
clip-path: polygon(0 0,0 0,100% 0,100% 0,100% calc(100% - 15px),calc(100% - 15px) 100%,15px 100%,0 100%);
height: 40px;
font-size: 0.7rem;
line-height: 14px;
letter-spacing: 1.2px;
transition: .2s .1s;
background-image: linear-gradient(90deg,#1c1c1c,#10b981);
border: 0 solid;
overflow: hidden;
}
button:hover {
cursor: pointer;
transition: all .3s ease-in;
padding-right: 30px;
padding-left: 30px;
}
</style>Stored at src/content/snippets/buttons/cut-corner-gradient-button.html