Inconsistent Media Queries making layout difficult to get right

After searching around the forum I have a general sense of what the X theme breakpoints are. In my code, I was able to mimic your breakpoints, but I have noticed that throughout the Cornerstone output the media queries output do not actually follow the guidelines you tell us, so it makes targeting certain layout challenges difficult at times. For example, in Cornerstone, I will set up a row layout to be one column up until the LG breakpoint, and then a different layout after that.

Screen Shot 2020-03-26 at 11.08.40 PM

Screen Shot 2020-03-26 at 11.10.49 PM

However, when inspecting the layout it is not quite right because in the code you are actually targeting this type of layout by way of:

This is problematic because everywhere you look within Cornerstone and within your forums, the LG breakpoint is min-width: 980px, but this code being output cleary considers LG to be min-width: 979px, which ends up resulting in an inaccurate layout.

So, how are developers supposed to truly mimic the breakpoints used by X in order to be able to seamlessly create our own code that will actually match what the Cornerstone builder actually outputs? Thanks.

Hi Scott,

Thanks for reaching out.

It seems correct, it’s in between tablet and laptop dimension, it’s the reason you’ll see desktop layout on tablet device. Example, if you intend to hide an element from tablet, it will also hide it from laptop, and if you display an element from laptop, it will then display it too on tablet.

The tablet and laptop resolution are on overlapping category. A tablet with keyboard can be a laptop, and a laptop with removable keyboard can be a tablet. Even the smallest desktop has 1024px, and 1024px is a tablet resolution too. And because there are many devices, the range in the preview are only made generic. For now, in order to fully control it in your target device, you may consider changing the options based on how large is the device. Example, if it’s an iPad which known to have the same resolution as desktop/laptop, then control your layout for laptop view instead of tablet view as it will take affect on iPad too.

Though, I agree that it will be more useful to have a user defined breakpoints which already added to our feature request list.

Thanks!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.