Closed (fixed)
Project:
Navigation
Version:
1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Oct 2023 at 23:05 UTC
Updated:
24 Oct 2023 at 17:09 UTC
Jump to comment: Most recent
Use the CSS only solution from Gin to indicate scrims (scrolling shadows) on top and bottom of content.
This removes the JS overhead and opts for a neat CSS solution which we're using for a while in Gin.
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:
Comments
Comment #3
saschaeggiComment #4
ckrinaI love this! For me this is working fine, but as I mentioned in Slack I recall Claire finding a bug when she was trying to do the same. Let's wait until Monday so she can get a chance to review this after working on #3380251: Scroll the sidebar when it's collapsed.
On the other side I see this is assuming the logo needs to stay sticky. The way the toolbar is implemented right now wouldn’t need it (the logo is not that important) but we might:
So for now the logo at the top sticky would be a change on behavior/designs although we might end up needing in the future. For this reason, I'd move the conversation about the logo sticky into a follow-up, and if Claire doesn't have any feedback from this we can merge the bottom one.
Comment #5
saschaeggi@ckrina as this uses a sticky background technique the only issue I could think of would have been that the scrim was not shown when a background color is used like on the active subnavigation. But I've worked around this issue which using an
rgba()value. Another method would be to usemix-blend-modebutrgba()might be the nicer option here.On the other side I see this is assuming the logo needs to stay sticky. The way the toolbar is implemented right now wouldn’t need it (the logo is not that important) but we might:Not at all. Just the bare minimum changes here (to move the scoll area to the content area) make it appear sticky, but we can change that as well.
We can change this behavior but would need to restructure the markup a little bit. I did not want to touch that just yet. Agreed that this could be done in a follow-up.
Comment #6
claireristow commentedI also love this, thanks @saschaeggi! The CSS solution is cleaner and much less buggy.
The shadow itself looks a bit different but that can be adjusted in a follow-up issue if needed. Looks good to merge on my end!
Comment #7
saschaeggi@ckrina rebased this MR, ready 🎉
Comment #9
ckrinaOk, merging this but a couple of follow-ups need to be addressed: