Closed (fixed)
Project:
Paragraphs
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Dec 2025 at 16:21 UTC
Updated:
27 Feb 2026 at 08:14 UTC
Jump to comment: Most recent, Most recent file

Comments
Comment #3
berdirComment #4
pivica commentedPushed new version. As discussed i change breakpoint to `min-width: 64rem` which is the same as in core top-bar.css. This will avoid displace.js api problems between 768px and 64rem because our paragraphs will sticky aftger 64rem.
Comment #5
berdirThis is primarily about the navigation module, not claro.
Testing with just core, this still works fine with toolbar, but when enabling navigation, it's unpredictable. It worked once for me but not sure why but usually it doesn't. The thing I noticed is that this variable isn't set?
I tested by installing paragraphs_demo and paragraphs_test and enabled the test behaviors on the text paragraph type.
Comment #6
berdirI think I see the problem, even when the mode is set to open initially and the tabs are visually, somehow the displace stuff isn't initialized. Opening and closing the navigation sidebar fixes that. I'm not sure who is responsible for calling that and if it somehow doesn't work because our element is initially not visible?
Comment #7
berdirComment #8
pivica commentedUpdated the MR to make sticky tabs work on all screen sizes using a mobile-first approach.
The problem
On smaller screens (< 64rem), the --drupal-displace-offset-top CSS variable is sometimes not set or set to an incorrect value. For example, on a 768px screen, the offset might be calculated as 48px when it should be 0.
This is a limitation in Drupal core's displace.js API:
Solution
Use a mobile-first approach:
This matches core's navigation breakpoint exactly, ensuring we only use the displace offset when the toolbar is actually fixed.
Here are screenshots of a new sticky behaviour for all screen sizes:
Mobile

Tablet

Desktop

Comment #9
berdirComment #11
berdirMerged, thanks.