Skip to content

Remove the gap above docs pages left from the old site banner - #75485

Merged
kaxil merged 1 commit into
apache:mainfrom
astronomer:remove-stale-docs-banner-offsets
Oct 23, 2026
Merged

kaxil merged 1 commit into
apache:mainfrom
astronomer:remove-stale-docs-banner-offsets

Conversation

@kaxil

@kaxil kaxil commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Docs pages start with a large empty band under the navbar. On airflow.apache.org, the content of a docs page begins 253px from the top of the window; the theme lays it out at 130px.

The cause is devel-common/sphinx_design/static/custom.css, which pads .base-layout by 163px !important ("banner + navbar + 2px padding") and offsets anchor targets by 161px (117px at 1280px and below). Those values date from #52016, when the site had a 40px banner above a 121px navbar. Since then airflow-site removed the banner and shrank the navbar to 90px (80px at 1280px and below), and the theme now pads body for the navbar and gives .base-layout its own 40px. The override stacks 163px on top of that.

This removes the .base-layout override, so the theme's 40px applies, and sizes the anchor offset to the navbar plus the same 40px: 130px, or 120px at 1280px and below.

Measured at 1728px wide Now With this PR
Content and left sidebar start at 253px 130px
Heading reached by an anchor link lands at 162px (71px below the navbar) 130px (40px below)

At 1100px wide, content moves from 297px to 174px and anchored headings land at 121px instead of 126px.

The right-hand "On this page" list is still pinned 263px from the top by a separate rule in the theme, so with only this change it sits lower than the content. apache/airflow-site#1701 fixes that.

Top of the docs index and the same page scrolled, at 1728px in dark mode. "Before" is airflow.apache.org. "After" is a local breeze docs build with #75485 and apache/airflow-site#1701 (theme wheel built from that branch):

Before After
Top before Top after
Scrolled before Scrolled after

custom.css still padded the docs layout by 163px and offset anchor
targets by 161px, sized for a 40px banner above a 121px navbar. The site
now has no banner, a 90px navbar (80px at 1280px and below), and the
theme already pads the body for the navbar, so docs content started
253px down instead of 130px.

Drop the padding override so the theme's 40px applies, and size the
anchor offset to the navbar plus the same 40px.
@kaxil
kaxil merged commit a5160a9 into apache:main Oct 23, 2026
7 checks passed
@kaxil
kaxil deleted the remove-stale-docs-banner-offsets branch October 23, 2026 14:54
@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-4-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
✅ v3-4-test PR Link

kaxil added a commit that referenced this pull request Oct 23, 2026
…nner (#75485) (#75487)

custom.css still padded the docs layout by 163px and offset anchor
targets by 161px, sized for a 40px banner above a 121px navbar. The site
now has no banner, a 90px navbar (80px at 1280px and below), and the
theme already pads the body for the navbar, so docs content started
253px down instead of 130px.

Drop the padding override so the theme's 40px applies, and size the
anchor offset to the navbar plus the same 40px.
(cherry picked from commit a5160a9)

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants