решил проблему таким способом
var c = String(Math.floor((window.outerWidth / window.innerWidth) * 100) / 100);
var d = ['0.25', '0.33', '0.5', '0.67', '0.75', '0.8', '0.9', '1'];
if (d.indexOf(c) == -1) {
for (var i = 0; i < d.length; i++) {
if (Number(d[i]) > Number(c)) {
$(':root').css('--max-width-one', window.innerWidth * Number(d[i]) + 'px');
$(':root').css('--width-out', window.innerWidth * Number(d[i]) + 'px');
break;
}
}
}
:root {
--width-out: 1920px;
--max-width-one: 1920px;
}
.header, .section_one,
.section_two, .footer {
margin-left: auto;
margin-right: auto;
max-width: var(--max-width-one);
}