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

  1. Install Drupal 9.x
  2. Enable Olivero
  3. 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

aaron.ferris created an issue. See original summary.

aaron.ferris’s picture

Issue summary: View changes
aaron.ferris’s picture

StatusFileSize
new439 bytes
aaron.ferris’s picture

Status: Active » Needs review
aaron.ferris’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 3: olivero-xl-breakpoint-3208526-3.patch, failed testing. View results

aaron.ferris’s picture

Status: Needs work » Needs review
gauravvvv’s picture

Yes, elements changing at breakpoint 1200px rather than 1300px. I have attached a screen recording for the same. Thanks for the patch.

Moving to RTBC.

gauravvvv’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: olivero-xl-breakpoint-3208526-3.patch, failed testing. View results

gauravvvv’s picture

Status: Needs work » Reviewed & tested by the community

Random failure. Moving to RTBC again.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: olivero-xl-breakpoint-3208526-3.patch, failed testing. View results

djsagar’s picture

Assigned: aaron.ferris » Unassigned
djsagar’s picture

StatusFileSize
new439 bytes

Just re-rolled the patch.

djsagar’s picture

Status: Needs work » Needs review
gauravvvv’s picture

That 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.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Back to RTBC as per #8

longwave’s picture

Title: Incorrect Breakpoint? » Incorrect XL breakpoint in Olivero

Improving the title a bit.

lauriii’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs subsystem maintainer review

It 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?

aaron.ferris’s picture

That'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).

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

sakthivel m’s picture

StatusFileSize
new439 bytes

Just Re-roll the patch 9.3.x

Status: Needs review » Needs work

The last submitted patch, 22: 3208526.22.patch, failed testing. View results

longwave’s picture

Status: Needs work » Needs review

No reroll was required, #14 and #22 are identical.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me

quietone’s picture

Status: Reviewed & tested by the community » Needs review

@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.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

pradipmodh13’s picture

StatusFileSize
new439 bytes

Created patch for Drupal 10.1.x version.

gaurav-mathur’s picture

Assigned: Unassigned » gaurav-mathur
gaurav-mathur’s picture

Assigned: gaurav-mathur » Unassigned
StatusFileSize
new166.51 KB
new16.83 KB
new170.57 KB

Patch #30 applied successfully on Drupal 10.1.x. Refer to screenshots.

gauravvvv’s picture

Breakpoint @media (--xl) is used in

/* Ensure that image doesn't overlap sidebar. */
.sidebar-grid .wide-image {
  @media (--lg) {
    width: calc(9 * var(--grid-col-width) + 8 * var(--grid-gap));
  }

  @media (--xl) {
    width: calc(10 * var(--grid-col-width) + 9 * var(--grid-gap));
  }
}

Other than that, we're not using this breakpoint.

andy-blum’s picture

Status: Needs review » Postponed (maintainer needs more info)
Issue tags: -Needs subsystem maintainer review

As @lauriii points out in #19, the breakpoints line up between the breakpoints.yml and the media-queries.pcss.css files

/*
 * Media query breakpoints.
 * Processed by postcss/postcss-custom-media.
 */

@custom-media --sm (min-width: 500px);
@custom-media --md (min-width: 700px);
@custom-media --lg (min-width: 1000px);
@custom-media --xl (min-width: 1300px);

/* Navigation related breakpoints */
@custom-media --nav-md (min-width: 500px);
@custom-media --nav (min-width: 1200px);
@custom-media --max-nav (max-width: 1200px);

/* Grid related breakpoints */
@custom-media --grid-md (min-width: 700px);   /* Grid shifts from 6 to 14 columns. */
@custom-media --grid-max (min-width: 1440px); /* Width of the entire grid maxes out. */
olivero.sm:
  label: Small
  mediaQuery: 'all and (min-width: 500px)'
  weight: 0
  multipliers:
    - 1x
olivero.md:
  label: Medium
  mediaQuery: 'all and (min-width: 700px)'
  weight: 1
  multipliers:
    - 1x
olivero.lg:
  label: Large
  mediaQuery: 'all and (min-width: 1000px)'
  weight: 2
  multipliers:
    - 1x
olivero.xl:
  label: X-Large
  mediaQuery: 'all and (min-width: 1200px)'
  weight: 3
  multipliers:
    - 1x
olivero.nav-md:
  label: Nav Medium
  mediaQuery: 'all and (min-width: 500px)'
  weight: 4
  multipliers:
    - 1x
olivero.nav:
  label: Nav
  mediaQuery: 'all and (min-width: 1200px)'
  weight: 5
  multipliers:
    - 1x
olivero.grid-md:
  label: Grid Medium
  mediaQuery: 'all and (min-width: 700px)'
  weight: 6
  multipliers:
    - 1x
olivero.grid-max:
  label: Grid Max
  mediaQuery: 'all and (min-width: 1440px)'
  weight: 7
  multipliers:
    - 1x

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?

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Just wanted to follow up if anyone has a response for #34 before closing.

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)
Issue tags: +Bug Smash Initiative

Since there's been no follow up, going to close out. if still an issue in D11 please re-open addressing #34