Problem/Motivation
This is a follow-up issue to #3531516: Admin toolbar height is not 100% since upgrading to Drupal 11.2. The following selector breaks off-canvas on the right because the div container there still has data-offset-top="0":

#drupal-off-canvas-wrapper {
[data-admin-toolbar] &:is([data-offset-top], [data-offset-bottom]) {
left: var(--drupal-displace-offset-left, 0) !important;
width: calc(100% - var(--drupal-displace-offset-left, 0px)) !important;
&:dir(rtl) {
right: var(--drupal-displace-offset-right, 0) !important;
width: calc(100% - var(--drupal-displace-offset-right, 0px)) !important;
}
}
}
Steps to reproduce
Proposed resolution
Do we have to add &:not:is([data-offset-right]) ?
Remaining tasks
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | Cursor_and_Notification_Center.png | 557.14 KB | mherchel |
Issue fork drupal-3562009
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3562009-off-canvas-on
changes, plain diff MR !14058
Comments
Comment #2
mherchelAdding image. I can fix this in CSS, but no clue why it has
data-offset-top="0"Comment #4
jurgenhaasThat's a great question, I don't know the answer, though. ECA is using the same off-canvas and also comes with that attribute.
Comment #5
mherchelFixed with CSS.
The proper fix would probably to go to whatever's injecting the
data-offset-top, but there's no way to know if it's just Layout Builder, or if there are also contrib modules out there that might have copied LB's implementation.So, fixed with CSS.
Comment #6
jurgenhaasTested with ECA and it works as expected.
Comment #9
nod_Committed and pushed 42d82bf6192 to 11.x and 4167c87cde7 to 11.3.x. Thanks!
Comment #12
nod_Comment #14
nod_Agreeing with #5, a css-only patch caused the bug, a css-only patch should fix it to make sure we don't create a regression for contrib