<testimonial-container>

  <testimonial-block>
    <q><p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p></q>
    <footer>Carmen Krueger</footer>
  </testimonial-block>

  <testimonial-block>
    <q><p>Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p></q>
    <footer>Edgar Gray</footer>
  </testimonial-block>

  <testimonial-block>
    <q><p>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</p></q>
    <footer>Frances Bryant</footer>
  </testimonial-block>

  <testimonial-block>
    <q><p>Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p></q>
    <footer>Sean Clayton</footer>
  </testimonial-block>

  <testimonial-block>
    <q><p>Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo.</p></q>
    <footer>Hana Stone</footer>
  </testimonial-block>

</testimonial-container>
* {
  box-sizing: border-box;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-kerning: auto;
}
html {
  font-family: sans-serif;
  -webkit-text-size-adjust: 100%;
  background: linear-gradient(#ccc, white) 100% center fixed;
}

testimonial-container {
  --size: 10pt;
  --bg: darkslateblue;
  display: block;
}
testimonial-block {
  display: block;
  position: relative;
  margin-bottom: calc(var(--size) * 2);
  padding: var(--size);
  background-color: var(--bg);
  border-radius: calc(var(--size) / 1);
  color: white;
  font-size: calc(var(--size) * 1.2);
  line-height: 1.4;
  font-family: sans-serif;
}
testimonial-block:nth-of-type(even) {
  --bg: slateblue;
}
testimonial-block::after {
  --translate: -100%;
  content: '';
  width: calc(var(--size) * 2);
  height: calc(var(--size) * 2);
  background: var(--bg);
  position: absolute;
  top: calc(100% - var(--size) - 1px);
  left: calc(100% - (var(--size) * 2));
  transform:
    translateX(var(--translate))
    rotateZ(45deg)
  ;
  z-index: -1;
}
testimonial-block q {
  display: block;
}
testimonial-block q::before {
  content: '“';
}
testimonial-block q::after {
  content: '”';
}
testimonial-block p {
  display: inline;
  margin: 0;
}
testimonial-block footer {
  margin-top: calc(var(--size) / 2);
  font-size: var(--size);
}

/* Responsive Styles */
testimonial-block footer {
  text-align: right;
}
testimonial-block footer::before {
  content: '– ';
}

@supports (--element("testimonial-container", {"minWidth": 500})) {
  [--self] testimonial-block {
    margin-bottom: calc(var(--size) * 3);
  }
  [--self] testimonial-block:nth-of-type(even) footer {
    text-align: left;
  }
  [--self] testimonial-block:nth-of-type(even)::after {
    --translate: 0;
    left: calc(var(--size) * 2);
    
  }
  [--self] testimonial-block:nth-of-type(odd) {
    margin-left: calc(var(--size) * 5);
  }
  [--self] testimonial-block:nth-of-type(even) {
    margin-right: calc(var(--size) * 5);
  }
}

@supports (--element("testimonial-container", {"minWidth": 900})) {
  testimonial-block {
    font-size: calc(var(--size) * 1.4);
  }
  [--self] testimonial-block {
    max-width: 60%;
    margin-bottom: calc(var(--size) * 5);
  }
  [--self] testimonial-block:nth-of-type(odd) {
    margin-left: 30%;
    margin-right: 10%;
  }
  [--self] testimonial-block:nth-of-type(even) {
    margin-left: 10%;
    margin-right: 30%;
  }
}
import deqaf from 'https://unpkg.com/deqaf'
import element from 'https://unpkg.com/jsincss-element-query/index.vanilla.js'

deqaf({stylesheet:{element}})

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.