JSFiddle - React, Tailwind, and code Playground

by Softlink

HTML

<div class="block">Кнопка</div><br>
<div class="block">Кнопка, которая поменяла ширину</div>

CSS

.block{
    position: relative;
    display: inline-block;
    padding: 20px;
    margin: 50px;
    background: #777;
    color: #222;
    text-shadow: 0 1px 1px #888;
    font-family: Arial;
    font-size: 16px;
    font-weight: bold;
}

.block:before, .block:after{
    content:'';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 10px;
    background: #777;
    z-index: -1;
}

.block:after{
    right: -9px;
    border-radius: 0 10px 10px 0;
}

.block:before{
    left: -9px;
    border-radius: 10px 0 0 10px;
}