Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Seven's admin styles for dialogs are overriding some of Off Canvas' styles.
Replication steps:
- Install the standard profile
- Install Content Moderation and commit bf999ed69d76b7cc381cab7f5f03ca19ee2813ea (before a temp fix for this) of Moderation Note
- Enable the Editorial Workflow on the Article Content Type
- Create an Article then visit the edit for at /node/N/edit
- Click the "View notes" local task, note lack of styles
Screenshots:
Before:
After:
Proposed resolution
Add a few CSS rules to enforce Off Canvas' styles.
Remaining tasks
None.
User interface changes
Off Canvas dialogs will look better in the backend.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#19 | off-canvas-2945571-19.patch | 577 bytes | bendeguz.csirmaz |
#16 | off-canvas-2945571-16.patch | 2.54 KB | bendeguz.csirmaz |
#14 | off-canvas-admin-testing.patch.txt | 568 bytes | lauriii |
off-canvas-seven-before.png | 268.16 KB | samuel.mortenson | |
off-canvas-seven-after.png | 265.67 KB | samuel.mortenson |
Comments
Comment #2
samuel.mortensonComment #3
tedbowThis looks good to me.
Comment #4
samuel.mortensonComment #6
samuel.mortensonAdding the framework manager review tag - this patch fixes a serious bug in the off canvas dialog that makes it unusable with the Seven theme. The changes to the Stable theme CSS needs a framework manager's approval, per a conversation I had with @xjm.
Comment #8
timmillwoodI hit a similar issue in #2949991: Add workspace UI in top dialog, but fixed it a little differently.
Comment #9
lauriiiComment #10
jofitz CreditAttribution: jofitz at ComputerMinds commentedRe-roll.
Comment #11
rp7 CreditAttribution: rp7 commentedPatch in #10 does not work for me, still the same issue.
The following CSS rule is what's causing this on my end:
If I disable the background: #fff, it looks fine.
Comment #12
rp7 CreditAttribution: rp7 commentedComment #13
rp7 CreditAttribution: rp7 commentedFollow-up: it appears that the patch works when the moderation_note (https://www.drupal.org/project/moderation_note) module is enabled.
Comment #14
lauriiiIt seems like the most recent patch doesn't work with the most recent version of core. It seems like the CSS in Seven shouldn't be applied at all to off-canvas dialogs. Could we make the selectors in Seven more specific so that they wouldn't apply to off-canvas dialogs?
I attached patch that I used for testing the most recent version of the patch. It can be by enabling
off_canvas_test
module and navigating to/off-canvas-test-links
path.Comment #16
bendeguz.csirmaz CreditAttribution: bendeguz.csirmaz at Cheppers commentedWhite background removed by using a (stronger) id selector.
Comment #17
bendeguz.csirmaz CreditAttribution: bendeguz.csirmaz at Cheppers commentedComment #18
lauriiiThanks for a new patch @bendeguz.csirmaz!
This problem is Seven specific bug caused by Seven. Would it be possible to fix this in Seven instead of Stable? According to our backwards compatibility policy, CSS files in Stable are public API and therefore shouldn't be changed without a very good reason.
I'm moving to Seven component since this is a bug in Seven.
Comment #19
bendeguz.csirmaz CreditAttribution: bendeguz.csirmaz at Cheppers commentedOverride from Seven's css.
Comment #20
lauriiiThis approach looks better!
Comment #21
phenaproximaLooks right to me.
Comment #23
lauriiiCommitted f0d889e and pushed to 8.7.x. Thanks! 🚀 Leaving open against 8.6.x to be considered for backport.
Comment #25
lauriiiCherry-picked 23c105c and pushed to 8.6.x.