canonical / canonical/vanilla-framework

Add our p-section--shallow spacing to h1,h2s by default

Open
#5,260 4 comments 0 reactions 0 assignees View on GitHub
P3 Triaged Triaged: Pragma
Dominant language
HTML
Stars
983
Forks
216
Avg merge
3d 13h
Merged PRs (30d)
3

Description

Wrapping headings in p-section--shallow is one of the most comment QA comments I have to leave, which leads me to think there's room for improvement. My propoosal:

- add it by default on h1, h2
- provide a class that is added on a parent, and allows us to reduce that margin-bottom in places like documentation sites, where we get consistent requests to make things significantly denser. We can then further expand this to affect font-sizes, also a requirement from the documentation team

Before:
![image](https://github.com/user-attachments/assets/c7bc8006-17cc-4813-ac72-88d7ebeb6423)
![image](https://github.com/user-attachments/assets/f7fa8cf7-1516-4fa6-b08c-9db255bfe429)

After:
![image](https://github.com/user-attachments/assets/c6f09b86-08a9-4f63-9497-e7da96d12523)
![image](https://github.com/user-attachments/assets/b63bfb9b-3a96-4327-ac1c-5bbe68230d10)

Contributor guide

Open the contributing guide

Research direction

Start by locating the existing p-section--shallow styles and the default h1 and h2 rules in the Vanilla Framework source. Review the examples shown in the issue, then define the heading defaults and parent class behavior so headings are shallow by default while documentation layouts can become denser; done means both spacing cases are covered consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, html, sass
Domain
design, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.