Test responsive CSS at both breakpoint boundaries
Admin ·
A media query checks whether a condition matches. A match alone does not decide which declaration wins. Reproduce both parts of the decision with two rules targeting the same class.
Try 599, 600 and 900 CSS pixels
Choose Two breakpoints. The rules target .responsive-layout with font-size 18px from 600 pixels and 20px from 900 pixels. Set Preview width to 599 pixels. Neither rule matches.
Set the width to 600 pixels to match the first rule. At 900 pixels, both match. The native viewport inside the preview checks the conditions at your chosen dimensions.
Apply the CSS and compare rule order
Download media-queries.css and include it in a page. Add responsive-layout as a class on a paragraph. At a 900-pixel viewport, inspect the paragraph in browser developer tools. With no overriding style, the computed font size is 20 pixels.
In the builder select the 900-pixel rule and choose Move query earlier. Export again and compare. At 900 pixels both queries still match, but the 600-pixel rule is later and wins at the same specificity and importance.
W3C CSS Cascading and Inheritance, cascade sorting orderW3C Media Queries, viewport width
Choose matches for a framework or orientation
Bootstrap 5.3 loads its default min-width values from 576 to 1400 pixels. Tailwind CSS v4 loads 40, 48, 64, 80 and 96 rem. Use the preset for the framework and version in your project, and adjust it if your configuration changes the defaults.
For an orientation query, set width to 360 pixels and height to 640 pixels to test portrait. Reverse the dimensions to test landscape. A print rule matches when the browser evaluates print media.
Bootstrap 5.3 default layout breakpointsTailwind CSS v4 responsive design breakpointsW3C Media Queries, viewport dimensions and orientation
Common questions
Why does changing my page's root font size leave a rem breakpoint unchanged?
Relative units in media queries use the browser's initial font size, before your stylesheet declarations are applied.
Does the match preview apply my typed declarations?
It verifies whether the conditions match. Apply the exported stylesheet in your own page to check its declarations against your real markup.