.button {
    --color: #7EFFB2;
    position: relative;
    display: inline-block;
    text-decoration: none;
    font-size: 15px;
    color: var(--color);
    padding: 10px 25px;
    border: 3px solid var(--color);
}

.button::before,
.button::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: inherit;
    transition: width .25s .15s, height .25s;
}

.button::before {
    top: -15px;
    left: -15px;
    border-width: 3px 0 0 3px;
}

.button::after {
    bottom: -15px;
    right: -15px;
    border-width: 0 3px 3px 0;
}

.button:hover::before,
.button:hover::after {
    width: calc(100% + 7px);
    height: calc(100% + 7px);
}