use $until instead of $to

renames the `$to` argument to `$until`. 'until' naturally implies the exclusive boundary of `$to`, whereas 'to' can be either and needs qualifying.
You might want to follow the way `@if` is written in the rest of the file:

```scss
@if $to {
    @if not $until {
    }
}
```