@function each-negative-rotate($rotate-config) {
  @each $key, $rotate in $rotate-config {
    $rotate-config: map.set($rotate-config, $key, -$rotate);
  }
  @return $rotate-config;
}

$utilities: map-merge(
  $utilities,
  (
    "rotate": (
      property: --bs-rotate,
      class: rotate,
      variants: rotate,
      values: $rotate-config,
    ),
    "negative-rotate": (
      property: --bs-rotate,
      class: -rotate,
      variants: rotate,
      values: each-negative-rotate($rotate-config),
    ),
  )
);
