div.example
  div.rectangle.rectangle--one
    |25px 200px 200px 25px
  div.rectangle.rectangle--one
    div.circle.circle--large.circle--top-right
    div.circle.circle--large.circle--bottom-right
    div.circle.circle--large.circle--bottom-left
    div.circle.circle--large.circle--top-left
View Compiled
$radius-small: 50px;
$radius-large: 200px;
$rect-min: 100px;
$rect-max: 200px;

@mixin conic($color: gold) {
  background-image: conic-gradient(
    $color 0%,
    $color 25%,
    lighten($color, 25%) 25%,
    lighten($color, 25%) 50%,
    $color 50%,
    $color 75%,
    lighten($color, 25%) 75%,
    lighten($color, 25%) 100%,
  )
}

html, body {
  height: 100%;
  font-family: sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

.example {
  display: flex;
  flex-direction: column;
}

.rectangle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  position: relative;
  margin: 40px;
  background: dodgerblue;
  width: $rect-max;
  height: $rect-min;
}

.rectangle--one {
  --ratio: #{min($rect-min / ($radius-large + $radius-large), 1)};
  
  border-radius: $radius-large $radius-large $radius-large $radius-large;
}

.circle {
  @include conic(gold);
  
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  border-radius: 999em;
  animation: shrink 4s infinite;
  opacity: 0.6;
}

.circle--large {
  width: $radius-large * 2;
  height: $radius-large * 2;
}

.circle--top-right {
  top: 0;
  right: 0;
  transform-origin: top right;
}

.circle--bottom-right {
  bottom: 0;
  right: 0;
  transform-origin: bottom right;
}

.circle--bottom-left {
  bottom: 0;
  left: 0;
  transform-origin: bottom left;
}

.circle--top-left {
  top: 0;
  left: 0;
  transform-origin: top left;
}

@keyframes shrink {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1);
  }
  50% {
    transform: scale(var(--ratio));
  }
  75% {
    transform: scale(var(--ratio));
  }
  100% {
    transform: scale(1);
  }
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.