steevehook
8/22/2018 - 2:19 PM

CSS clip path

CSS clip path

* {
  /* Initial --> as if it was not even declared */
  --clip-path: initial;
  --webkit-clip-path: var(--clip-path);
  clip-path: var(--clip-path);
}

.block {
  // define a diamond
  --clip-path: polygon(0% 50%, 50% 0%, 100% 50%, 50%, 100%);
}

/* See more at: https://developer.mozilla.org/en-US/docs/Web/CSS/clip-path */