JSFiddle - React, Tailwind, and code Playground

by oilvier

HTML

<p><a href="#">Mon lien</a></p>

<p><a href="#">Mon lien un peu plus long pour qu'on voit l'effet sur plusieurs lignes</a></p>


<button type="button">
  Mon bouton
</button>

SCSS

body {
  font-family: Arial; 
  max-width: 50%;
}

p {
  margin: 10px;
}

a {
  position: relative;
  color: #2D190D;
  text-decoration: underline;
  font-weight: bold;
  transition: background .15s ease-in;
  
  &::before {
    content: '';
    background-color: #c4f0f0;
  }
  
  &:hover,
  &:focus {
    background-color: #c4f0f0;
    transition-timing-function: ease-out;
  }
  
  &:hover {
    text-decoration: none;
  }
}

button {
  display: inline-block;
  border: 2px solid transparent;
  font-weight: bold;
  font-size: 14px;
  line-height: normal;
  letter-spacing: .8px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  padding: 10px 30px;
  transition: background .15s ease-in;
  
  background-color: #2D190D;
  color: white;

  &:hover,
  &:focus {
    background-color: #54BCBF;
    color: #2D190D;
    transition-timing-function: ease-out;
  }
}