diff --git a/tests/Feature/StylesheetsTest.php b/tests/Feature/StylesheetsTest.php index f4c21d0b..c896455e 100644 --- a/tests/Feature/StylesheetsTest.php +++ b/tests/Feature/StylesheetsTest.php @@ -324,6 +324,10 @@ it('writes a media query, anywhere all.css reaches, only at M3\'s breakpoints, i && preg_match('/(?:^|[\s:<>=(])(?:min-|max-)?height\b/', $feature) === 1 && ! str_contains($feature, 'width'); + // Range syntax (`width >= 840px`, `840px <= width < 1200px`), as the layout stylesheets' + // own check required before it folded into this one: never `min-width`/`max-width`. + expect($feature)->not->toMatch('/\b(?:min|max)-(?:width|height|aspect-ratio)\b/', "{$query} is not written as a range"); + preg_match_all('/(\d*\.?\d+)([a-z%]*)/i', $feature, $lengths, PREG_SET_ORDER); foreach ($lengths as [, $number, $unit]) {