I have clip-part to make "cut corner" effect.
I would like to change background to white and use green border. Problem is, when I change ba
add some gradient to fill the missing spaces:
.test {
background: red;
width: 100px;
height: 100px;
box-sizing:border-box;
/* CORNERS */
clip-path: polygon(10px 0%, calc(100% - 10px) 0%, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0% calc(100% - 10px), 0% 10px);
}
.test:hover {
--grad:transparent 49.5%,green 50%;
background:
linear-gradient(to top right ,var(--grad)) top right,
linear-gradient(to top left ,var(--grad)) top left,
linear-gradient(to bottom right,var(--grad)) bottom right,
linear-gradient(to bottom left ,var(--grad)) bottom left,
white;
background-size:13px 13px; /* 10px of the clip-path + 3px of border */
background-repeat:no-repeat;
background-origin:border-box;
cursor: pointer;
border: 3px solid green;
}