You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today I realised that GeneratePress and GenerateBlock are using different media queries for mobile/tablet breakpoint by default.
GeneratePress defaults
GenerateBlocks defaults
Mobile: 0-768 Tablet: 769-1024 Desktop: 1025-∞
Mobile: 0-767 Tablet: 768-1024 Desktop: 1025-∞
Because of this, between 767px-769px, different parts of my website starts behaving unexpectedly and it bothers me. I've tried using the undocumented media query filters for overriding GeneratePress media queries to match GenerateBlocks, but found that not everything is affected by this filter. For example this part is hardcoded: assets/css/main.css#L1566-L1652
I think GP should follow GB's breakpoints everywhere (as those are more conventional) or at least media query filters should affect all media queries of GP. I can think of many different solutions, but I'm only started working with GP&GB for a week, so I don't fully understand how it works yet.
As the generate_media_queries filter is undocumented, I'm submitting this issue as a feature request, instead of a bug, however I think GP and GB using different breakpoints could be easily considered a bug.
UPDATE:
Ok, now I actually think that this is a bug 👾. I've searched all assets/css files for 767px and 768px and I can see that 768px is sometimes used inconsistently as the max for mobile (for example here), and many times correctly as the starting point for tablet (for example here). Updated the CSS files and now the breakpoints are beautifully consistent. Added a PR.
frzsombor
changed the title
Unified media queries
[bug?] Unified media queries
Jun 10, 2024
frzsombor
changed the title
[bug?] Unified media queries
Bug?: Unified media queries
Jun 24, 2024
Description
Today I realised that GeneratePress and GenerateBlock are using different media queries for mobile/tablet breakpoint by default.
Tablet: 769-1024
Desktop: 1025-∞
Tablet: 768-1024
Desktop: 1025-∞
Because of this, between 767px-769px, different parts of my website starts behaving unexpectedly and it bothers me. I've tried using the undocumented media query filters for overriding GeneratePress media queries to match GenerateBlocks, but found that not everything is affected by this filter. For example this part is hardcoded: assets/css/main.css#L1566-L1652
I think GP should follow GB's breakpoints everywhere (as those are more conventional) or at least media query filters should affect all media queries of GP. I can think of many different solutions, but I'm only started working with GP&GB for a week, so I don't fully understand how it works yet.
As the
generate_media_queries
filter is undocumented, I'm submitting this issue as a feature request, instead of a bug, however I think GP and GB using different breakpoints could be easily considered a bug.References
https://github.com/tomusborne/generatepress/blob/3.4.0/inc/theme-functions.php#L356-L374
https://github.com/tomusborne/generateblocks/blob/1.9.1/includes/functions.php#L186-L197
The text was updated successfully, but these errors were encountered: