Chrome Inspector: Media Queries off by 1 Pixel

431 views Asked by At

When inspecting media queries in chrome inspector they are not firing at the correct screen size but rather 1 pixel off.

For example I have following query:

@media (max-width: 767px){
    .hide-mobile {
        display: none;
    }
}

When I open Chrome inspector -> toggle device toolbar -> set the device to "responsive" and enter 767px device width, the element is not hidden. It is hidden if I set the device width to 766px.

My best guess is, that chrome emulates device width to 767.xyz pixels rather than 767px. Is this correct?

0

There are 0 answers