<div class="closet">
  have a good day
  <div class="flags">
    <div class="flag red">
      <span>red</span>
    </div>
    <div class="flag yellow">
      <span>yellow</span>
    </div>
    <div class="flag blue">
      <span>blue</span></div>
  </div>
</div>
@import url('https://fonts.googleapis.com/css?family=Dosis');

:root {
  --red: #ee4d2d;
  --yellow: #ffa604;
  --blue: #16b6fb;
  --size: 300px;
  font-family: Futura, sans-serif;
}

.closet {
  width: calc(var(--size) * .8 - 2rem);
  height: calc(var(--size) - 2rem);
  background-image: linear-gradient(60deg, #42355e, #423552);
  position: relative;
  margin: 0 auto;
  border-radius: 2px 7px 7px 2px;
  display: flex;
  color: white;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 1rem;
  text-shadow: rgba(255,255,255,.1) 2px 2px 2px;
}
.flags {
  position: absolute;
  top: 10px;
  right: -3px;
/*   width: 30px; */
}
.flag {
  color: white;
  text-align: center;
  padding: 2px 6px;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  position: relative;
/*   float: right; */
}
.flag:not(:first-child) {
  margin-top: 7px;
}
.flag::before {
  content: "";
  display: inline-block;
  position: absolute;
  right: 0;
  bottom: -0.1875rem;
  border-top: 0.1875rem solid currentColor;
  border-right: 0.1875rem solid transparent;
  filter: brightness(40%);
}
.red {
  background: var(--red);
  color: var(--red);
}
.yellow {
  background: var(--yellow);
  color: var(--yellow);
}
.blue {
  background: var(--blue);
  color: var(--blue);
}
span {
  color: white;

  font-size: 12px;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.