JSFiddle - React, Tailwind, and code Playground

by oilvier

HTML

<button type="button" class="a">
  <span>Trouver un magasin</span>
</button>

<button type="button" class="b">
  Trouver un magasin
</button>

<div>
  <button type="button" class="a">
    <span>Trouver un magasin</span>
  </button>

  <button type="button" class="b">
    Trouver un magasin
  </button>
</div>

SCSS

body {
  margin: 20px;
  background: white;
}

div {
  padding: 20px;
  background-color: beige;
}

button {
  position: relative;
  margin: 20px;
  border: 2px solid #6ebbbe;
  padding: 10px;
  background-color: white;
  color: #2b190e;
  font-size: inherit;
  cursor: pointer;
  
  &::before {
    content: '⁖';
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 1em;
    height: 1em;
    color: #6ebbbe;
    font-size: 24px;
    line-height: 0.8;
    transform: translate(50%, -50%) rotate(130deg);
    z-index: 1;
  }
  
  &:focus {
    outline: 2px solid darken(#6ebbbe, 15);
  }
  
  &:hover {
    background-color: #6ebbbe;
  }
}

$r: 12px;
.a {
  border: none;
  padding: 0;
  background-color: transparent;
  
  > span {
    position: relative;
    z-index: 1;
    display: block;
    border: 2px solid #6ebbbe;
    padding: 10px;
    overflow: hidden;
    
    &::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      margin: -$r;
      padding: $r;
      box-shadow: 0 0 0 300px white;
      border-radius: 50%;
      z-index: -1;
    }
  }
  
  &:hover {
    background-color: transparent;
    
    > span {
      background-color: #6ebbbe;
    }
  }
}

.b {  
  &::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    display: block;
    width: 1em;
    height: 1em;
    background-color: white;
    font-size: 24px;
    border-radius: 100%;
    transform: translate(50%, -50%);
  }
}

div .b::after {
  background-color: beige;
}