Skip to content

Align project card titles with their icons on /downloads and /docs - #904

Merged
wu-sheng merged 1 commit into
masterfrom
fix/card-title-icon-alignment
Aug 25, 2026
Merged

Align project card titles with their icons on /downloads and /docs#904
wu-sheng merged 1 commit into
masterfrom
fix/card-title-icon-alignment

Conversation

@wu-sheng

Copy link
Copy Markdown
Member

What

Project names sat about 9px below their icons on every card of /downloads and /docs.

Why

The theme sets a global heading rule:

// themes/docsy/assets/scss/_styles_project.scss
h1, h2, h3, h4, h5, h6 { padding-top: 1.1rem; }

Both card titles are <h5> and reset only margin, never padding. That 17.6px lived inside the flex item, so align-items: center centered the padded box rather than the text — pushing the visible name down on every card, on both pages.

Changes

  • padding: 0 on .dl-card-title (downloads cards) and .docs-card-title (documentation cards).
  • padding: 0 on the Docker card's h5 — same page, same inherited padding, so its title would otherwise sit lower than its neighbours'.
  • .docs-card-head min-height 30px → 37px. 30px only covered the icon; with the padding gone, a wrapped 2-line title is 36.25px and would have pushed that card's description below its neighbours'. 37px covers both. .dl-card-head's existing 44px already covers the new, shorter content, so it is unchanged.

Also normalizes two release dates in data/releases.yml that were still in ISO form — NodeJS Agent 0.9.0 (2026-06-26) and Python Agent 1.2.0 (2025-05-11) — to the site's Mon. DDth, YYYY format. They were the only two left.

Verification

Built the site with Hugo and screenshotted both pages headless at 1440px. Icon and name are now centered on each other, and the blocks below line up across each row — including the wrapped "SkyWalking GraalVM Distro" card, whose SOURCE/DISTRIBUTION rows stay level with its neighbours'.

The theme sets `h1..h6 { padding-top: 1.1rem }` globally. Both card titles
are `<h5>` and reset only `margin`, never `padding`, so that 17.6px sat
inside the flex item — `align-items: center` centered the padded box and
dropped the visible name ~9px below the icon on every project card, on
both /downloads and /docs.

Reset `padding` on `.dl-card-title`, `.docs-card-title`, and the Docker
card's `h5` (same page, same inherited padding). With the padding gone a
wrapped 2-line docs title is 36.25px, which overflowed `.docs-card-head`'s
30px min-height and would have pushed that card's description below its
neighbours', so raise it to 37px. `.dl-card-head`'s 44px already covers
the new, shorter content.

Also normalize two release dates that were still in ISO form —
NodeJS Agent 0.9.0 and Python Agent 1.2.0 — to the site's
`Mon. DDth, YYYY` format.
@netlify

netlify Bot commented Aug 25, 2026

Copy link
Copy Markdown

Deploy Preview for skywalking-website-preview failed.

Name Link
🔨 Latest commit 7e23467
🔍 Latest deploy log https://app.netlify.com/projects/skywalking-website-preview/deploys/6a8da94bbeece700080c32ee

@wu-sheng
wu-sheng merged commit 3dff8e4 into master Aug 25, 2026
1 of 5 checks passed
@wu-sheng
wu-sheng deleted the fix/card-title-icon-alignment branch August 25, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant