Breakpoints not working as expected

Posted in: Newspaper
Post count: 19

We are currently having an issue with custom CSS in Custom Code -> Advanced CSS.

We are changing the following styles based on breakpoints, in order to resize the logo and ad banner:

.td-header-sp-recs
.td-header-sp-logo
.td-main-logo .td-retina-version
.td-header-sp-logo img

Everything works normally, but there is one problem.

The breakpoints seem to be ignored when the window is exactly 1018 pixels wide.

At 1017, the 768px – 1018px CSS is applied correctly.
At 1019, the 1019px – 1140px CSS is applied correctly.
But at 1018, neither CSS is applied. It reverts back to the ‘default’ CSS.

Post count: 19

I’d like to send you either screenshots or URL to better explain what is happening, but I don’t want to put either of those in a public ticket.

Post count: 22421

Hello,

In order to have the 1080 as well, simply modify the first viewport to 1019 px instead of 1018. You can add your own sizes in the default css tab by usiong @media like so:


@media
(min-width: 768px) and (max-width: 1019px) {
your css code here;
}

Thanks.

Post count: 19

We have added new breakpoints in the past with no luck. Just tried again, this time with screenshots to show you what is going on. Dimensions are in upper right:

1150px wide, looks good:

1150px wide

1151px wide, reverts to prior style:

1150px wide

1152px wide, looks good:

1150px wide

Code specifically says 1151px, and all styles are !important, but still get overwritten

1150px wide

Any ideas?

Post count: 22421

Hello,

There is also the js to consider. Not only the css works with breakpoints. Our theme also has js loaded elements. If you alter the js, there is another step to be taken as the theme uses the min js version so any change to the js will require you to minify the js file after the change and replace the tagdiv min js code with the new modified version and minifed of course.

Thank you!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.