Skip to content

Mobile fixed header needs spacing above page title #763

@jjroelofs

Description

@jjroelofs

Summary

When mobile fixed header is enabled, the page title appears too close to the header with no visual breathing room. Users report the title appears "under" the header.

Steps to reproduce

  1. Enable "Fixed Header on Mobile" in theme settings
  2. Visit a page with a page title (e.g., contact form)
  3. Observe the page title starts immediately below the header with no spacing

Example Project

Reproducible on any DXPR Theme installation with fixed header and page title enabled.

What is the current bug behavior?

Page title content starts exactly at the header's bottom edge, appearing cramped or "under" the header.

What is the expected correct behavior?

There should be visual breathing room (e.g., 1rem/16px) between the fixed header and the page title content.

Relevant logs and/or screenshots

From Drupal.org #3556735:

"title under header" where only part of "Formulaire de contact" displays

Possible fixes

Add spacing to body padding for anonymous/non-toolbar users:

&:has(#navbar.header-mobile-fixed):not(.toolbar-horizontal, .toolbar-vertical, .toolbar-fixed) {
  padding-top: calc(var(--dxt-setting-header-mobile-height) + 1rem) !important;
}

Related: Drupal.org #3556735, Issue #762 (displacement bug - separate root cause)

Metadata

Metadata

Assignees

No one assigned

    Labels

    8.xbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions