Sticky table header is not sticky if --drupal-displace-offset-top is not defined

Created on 20 March 2024, about 1 year ago
Updated 29 July 2024, 8 months ago

Problem/Motivation

If CSS variable --drupal-displace-offset-top is not defined, tableheader is not sticky anymore, because this one have no fallback value https://git.drupalcode.org/project/drupal/-/blob/11.x/core/themes/claro/...

Bug was catched here https://www.drupal.org/project/navigation/issues/3432222 🐛 The sticky header has an offset Needs review

Steps to reproduce

1. Standard profile installation
2. composer require drupal/navigation
3. drush en -y navigation
4. checkout in MR from here https://www.drupal.org/project/navigation/issues/3432222 🐛 The sticky header has an offset Needs review (or if this task is already fixed - no need), just use navigation module as it is
5. generate several nodes so it's enough to get sticky table header on this page "/admin/content" (faster with devel generate, than manually)
6. scroll down on "/admin/content" -> no sticky table header

Proposed resolution

Replace

top: var(--drupal-displace-offset-top);

by

top: var(--drupal-displace-offset-top, 0px);
🐛 Bug report
Status

Fixed

Version

10.2

Component
Claro 

Last updated 1 day ago

Created by

🇷🇺Russia kostyashupenko Omsk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024