canonical / canonical/vanilla-framework

Hero Pattern: Incorrect section placement

Open
#5,396 2 comments 0 reactions 0 assignees View on GitHub
Review: Design needed
Dominant language
HTML
Stars
983
Forks
216
Avg merge
3d 13h
Merged PRs (30d)
3

Description

**Describe the bug**

While building https://github.com/canonical/canonical.com/pull/1406, I noticed an issue with the hero macro that prevented the page from being built with the hero macro. When flipping between my in-progress support page and the [postgresql managed page](https://canonical.com/data/postgresql/managed), I found that the spacing between the title and the description was different.

Currently, the title blocks are wrapped in `.p-section--shallow`, and the description is wrapped in a separate `.p-section--shallow`. This creates a lot of space between the title area and the description:

Screenshot 2024-10-23 at 3 11 07 PM

Following the example from the [postgresql managed page](https://canonical.com/data/postgresql/managed), the titles and description can all be wrapped in a single shallow section to tighten things up a bit:

Screenshot 2024-10-23 at 3 12 54 PM

Contributor guide

Open the contributing guide

Research direction

Search the hero macro for the title blocks and `.p-section--shallow` wrappers, then compare its output with the PostgreSQL managed page linked in the issue. The work is done when the title and description share one shallow section, the spacing matches the example, and the support page builds with the hero macro.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.