Mobile First/Custom Breakpoint not being recognized in Header after regenerating Block CSS

Description:
I am currently using mobile first and 1 additional custom breakpoint. See screenshot below for exact setup.

I discovered one day when regenerating my HTML/CSS via Settings, that my desktop menu was no longer visible (and my mobile menu button was visible for all breakpoint). However, when I made a change to the header (updated anything) and saved in the editor - the visibility was working correctly again for all breakpoints. But when I regenerated CSS via the settings panel again (specifically Block CSS button) - the issue reappeared again.

I look at this thoroughly to see if any blocks on my header were causing errors - and narrowed it down to the css file (cc-tp-cwicly_header.css?ver=1703796068) - which contained different content depending on if I saved changes through the editor view or regenerated css through the settings panel.

I also narrowed it down to specifically the 1 additional custom breakpoint that was missing in the above css file when regenerating css.

I also need to mention that everything always appears as intended on the backend. This issue is only reflected on the front-end.

I also recreated this issue in a test cwicly environment. See this link. cwiclydemo – Just another WordPress site (instawp.xyz)

Below are the steps to recreate this issue.

Created the following custom breakpoint settings:

image

Step 1
Created a new standard header and inserted a Heading.
Set to Display: None at base breakpoint
Set to Display: Flex at Tablet Portrait (custom breakpoint)

Back-end View (appears correctly):

Front-end View (appears correctly):

Content of CSS file (cc-tp-cwicly_header.css?ver=1703800369):

.heading-c002e14 {
    color: var(--cc-color-1);
    display: none;
}

@media screen and (min-width: 767px) {
}

@media screen and (min-width: 991px) {
    .heading-c002e14 {
        display:flex;
    }
}

@media screen and (min-width: 1366px) {
}

Step 2
Regenerate Block CSS (via Settings panel):

Back-end View (appears correctly):

Front-end View (DOES NOT appear correctly):

Content of CSS file (cc-tp-cwicly_header.css?ver=1703800450):

.heading-c002e14 {
    color: var(--cc-color-1);
    display: none;
}

@media screen and (min-width: 767px) {
}

@media screen and (min-width: 991px) {
}

@media screen and (min-width: 1366px) {
}
1 Like

I also want to add to this bug report - that this issue appears to be happening to pages as well (not just header template parts). I have a div that is flex column at mobile and then flex row at custom breakpoint - and when Regenerating Block CSS in settings panel - the custom breakpoint is no longer recognized. If I edit the page (with any edit and save) - the custom breakpoint is recognized on the front-end again.

Hi @bmc38119,

Thank you for taking the time to report this, and sharing a detailed reproduction process!

I have been able to reproduce this issue on my end, and can confirm it is a bug.
As you mentioned, it doesn’t seem to exclusively happen to template parts.

Rest assured, we’ll have a fix for this as soon as possible.

Apologies for the inconvenience.

Thank you for your patience on this, @bmc38119!

This should now be fixed with 1.4 :

Kindly let me know if this is the case on your end.
Thank you in advance.

@Araminta

I have tested and validated that this is bug has been resolved. Thank you!

2 Likes