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

Replace use of title component with heading #77

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

kevindew
Copy link
Member

The title component has been removed from govuk_publishing_components 1 and thus we need to replace it. The heading component with an xl font-size is functionally equivalent.

I applied this by using Ashley's example 2, however I omitted setting a margin_bottom of 8 as that matches the margin already added to govuk-heading-xl and rendered identically.

@govuk-ci govuk-ci temporarily deployed to govuk-chat-replace-titl-crgibs February 26, 2025 14:20 Inactive
The title component has been removed from govuk_publishing_components [1]
and thus we need to replace it. The heading component with an xl
font-size is functionally equivalent.

I applied this by using Ashley's example [2], however I omitted setting
a margin_bottom of 8 as that matches the margin already added to
`govuk-heading-xl` and rendered identically.

In updating the tests I've switched from using a class based selector to
using element, h1. I've done this because it seems more semantic to
match on the element name since we only expect one h1 per response and
don't really mind what class it is in request tests.

[1]: alphagov/govuk_publishing_components#4653
[2]: https://github.com/alphagov/collections/pull/3963/files
@kevindew kevindew force-pushed the replace-title-component branch from bd5e0ad to 9e1ae08 Compare February 26, 2025 14:41
@govuk-ci govuk-ci temporarily deployed to govuk-chat-replace-titl-crgibs February 26, 2025 14:41 Inactive
@kevindew kevindew merged commit 35898d2 into main Feb 26, 2025
8 checks passed
@kevindew kevindew deleted the replace-title-component branch February 26, 2025 14:50
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.

3 participants