@use 'sass:math';

@function rs($pixels, $base-vw: 1600px) {
    $vw-value: math.div($pixels * 100vw, $base-vw);

    @return max($vw-value, $pixels);
}

@function columns($columns) {
    @return calc(
        (#{$columns} * var(--layout-column-width)) +
            ((#{$columns} - 1) * var(--layout-column-gap))
    );
}

@mixin child-grid($columns) {
    grid-template-columns: repeat($columns, minmax(0, 1fr));
    column-gap: var(--layout-columns-gap);
    display: grid;
}
