<div id="container">
  <p>Latte teapot shincha blend <a class="link" href="#"><span data-content="chamomile">chamomile</span></a> yixing scented shrub iced ginger. Chamomile irish breakfast fermentation london fog gaiwan <a class="link" href="#"><span class="dotted" data-content="boba">boba</span></a> lapsang souchong ceylon shincha teahouse <a class="link" href="#"><span class="line-through" data-content="kombucha">kombucha</span></a> camellia sinensis white. Pu’erh lychee tisane ceylon infusion ginger antioxidant <a class="link" href="#"><span class="dashed" data-content="jasmine">jasmine</span></a> darjeeling antioxidant zen mint. Oolong taro honeydew shoumei white pearl milk boba <a class="link" href="#"><span class="double" data-content="latte">latte</a> lapsang souchong white rooibos. Mug tea time english breakfast kukicha boba tisane <a class="link" href="#"><span class="wavy" data-content="matcha">matcha</span></a> teacup.</p>
</div>
@import url('https://fonts.googleapis.com/css?family=Overpass:300,400&display=swap');

$bg: #fff;
$text: #2e2e2e;
$blue: #2c2fe8;
$darkblue: darken($blue, 10%);

* {
  box-sizing: border-box;
  &::before, &::after {
    box-sizing: border-box;
  }
}

body {
  font-family: 'Overpass', sans-serif;
  font-size: 1em;
  font-weight: 300;
  line-height: 1.5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  min-height: 100vh;
  color: $text;
  background: $bg;
  @media (min-width: 48rem) {
    font-size: 1.25em;
  }
}

#container {
  margin: auto;
  padding: 0 1rem;
  max-width: 48rem;
  width: 100%;
}

a {
  text-decoration: none;
  color: black;
  cursor: pointer;
}

.link {
  position: relative;
  transition: clip-path 275ms ease;
  &:hover span::before, &:focus span::before {
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  }
  span {
    position: relative;
    display: inline-block;
    color: $blue;
    &::before {
      position: absolute;
      content: attr(data-content);
      color: $darkblue;
      text-decoration: underline;
      text-decoration-color: $darkblue;
      clip-path: polygon(0 0, 0 0, 0% 100%, 0 100%);
      transition: clip-path 275ms ease;
    }
  }
}

span.dotted::before {
  text-decoration-style: dotted;
}

span.dashed::before {
  text-decoration-style: dashed;
}

span.double::before {
  text-decoration-style: double;
}

span.wavy::before {
  text-decoration-style: wavy;
}

span.line-through::before {
  text-decoration-line: line-through;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.