We rely on some lazy Sass math like -$border-width, so in these early steps of migrating to CSS variables, we're bound to find some issues. In this case, we're generating bad CSS because of that lazy math (-var(--bs-border-width)). The fix is using calc() to multiply by -1. I thought about reverting the change for these instances, but it'd just be ducking the inevitable, so decided to push it here for now.
Fixes #35986 (closed).