Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add margin_bottom to heading_options #9863

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Add margin_bottom to heading_options #9863

merged 1 commit into from
Jan 29, 2025

Conversation

JamesCGDS
Copy link
Contributor

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

What

This PR amends the margin_bottom option for the main heading to always include a bottom margin. Previously, this would be set to nil if title_margin_bottom wasn't present however this didn't remove the bottom margin - rather it fell back to the title component's default bottom margin of 50px. Since the heading component doesn't include a default bottom margin, switching to this component resulted in removing the spacing beneath the main heading altogether. This PR reinstates it.

Why

To reinstate the original spacing.

Visual changes

Spacing below the main heading has been reinstated.

The title component includes a margin bottom by default and therefore I’ve added some margin_bottom to the heading options. I believe this should be okay because even though passing nil for the bottom margin was an option previously, this didn’t mean any margin was removed - rather it fell back to the default bottom margin of the title component. In other words, adding some bottom margin here for every instance shouldn’t cause any issues as I don’t believe there is a scenario where the heading will have no bottom margin.
@JamesCGDS JamesCGDS merged commit 4bd9e69 into main Jan 29, 2025
24 checks passed
@JamesCGDS JamesCGDS deleted the fix_heading_spacing branch January 29, 2025 14:33
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.

2 participants