I've noticed what appears to be an incorrect px width declared inside olivero.breakpoints.yml
According to that file, the breakpoint for olivero.xl is
olivero.xl:
label: X-Large
mediaQuery: 'all and (min-width: 1300px)'
weight: 3
multipliers:
- 1x
Im not seeing any noticeable layout changes at 1300px viewport width, the main changes seem to happen at 1200px.
Looking into the Olivero css I can see many references to 75rem (1200px at 16px base font size) and not many (2) at 81.25rem (1300px base font size) which leads me to believe the Olivero xl breakpoint is 1200px, not 1300px.
Problem/Motivation
Breakpoint file seems to reference an incorrect width
Steps to reproduce
- Install Drupal 9.x
- Enable Olivero
- Notice elements changing at breakpoint 1200px rather than 1300px (an example would be the site branding block)
@media (min-width: 75rem)
[dir="ltr"] .site-branding {
padding-right: 2.25rem;
}
Proposed resolution
Alter the breakpoint file
Comments
Comment #2
aaron.ferris commentedComment #3
aaron.ferris commentedComment #4
aaron.ferris commentedComment #5
aaron.ferris commentedComment #7
aaron.ferris commentedComment #8
gauravvvv commentedYes, elements changing at breakpoint 1200px rather than 1300px. I have attached a screen recording for the same. Thanks for the patch.
Moving to RTBC.
Comment #9
gauravvvv commentedComment #11
gauravvvv commentedRandom failure. Moving to RTBC again.
Comment #13
djsagar commentedComment #14
djsagar commentedJust re-rolled the patch.
Comment #15
djsagar commentedComment #16
gauravvvv commentedThat was a random failure in patch #3, no need to re-roll @djsagar. It still passes the CI test. And patch #3, #14 look the same, try to attach interdiff while re-rolling.
Comment #17
longwaveBack to RTBC as per #8
Comment #18
longwaveImproving the title a bit.
Comment #19
lauriiiIt seems like the breakpoints directly map to what's in core/themes/olivero/css/base/variables.pcss.css. Maybe we need to improve documentation or rewise the breakpoints to add clarity on the purpose of the different breakpoints?
Comment #20
aaron.ferris commentedThat's a good point. Nav seems to use the 1200px breakpoint, XL 1300px.
@media (--xl)isn't used very often (I see 2 references), 1200px still seems to be where most of the width changes lie via@media (min-width: 75rem).Comment #22
sakthivel m commentedJust Re-roll the patch 9.3.x
Comment #24
longwaveNo reroll was required, #14 and #22 are identical.
Comment #27
smustgrave commentedLooks good to me
Comment #28
quietone commented@Sakthivel M, removing credit for uploading an identical patch.
This is tagged "Needs subsystem maintainer review", let's wait on that response before sending this to a committer.
Comment #30
pradipmodh13 commentedCreated patch for Drupal 10.1.x version.
Comment #31
gaurav-mathur commentedComment #32
gaurav-mathur commentedPatch #30 applied successfully on Drupal 10.1.x. Refer to screenshots.
Comment #33
gauravvvv commentedBreakpoint
@media (--xl)is used inOther than that, we're not using this breakpoint.
Comment #34
andy-blumAs @lauriii points out in #19, the breakpoints line up between the breakpoints.yml and the media-queries.pcss.css files
While the 1200px breakpoint is used more frequently, I dont know that I agree we need to change the XL to match the nav breakpoint. Is there a UX or design argument to making this change other than there being a lesser-used breakpoint 100px away from a more commonly used breakpoint?
Comment #36
smustgrave commentedJust wanted to follow up if anyone has a response for #34 before closing.
Comment #37
smustgrave commentedSince there's been no follow up, going to close out. if still an issue in D11 please re-open addressing #34