alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.16k stars 320 forks source link

Assess our custom heading classes in components #4277

Open owenatgov opened 11 months ago

owenatgov commented 11 months ago

What

Look for instances in GOV.UK Frontend where we've used a heading element in the markup and a custom class to apply styling and typography and see where we can replace bespoke styling with out govuk-heading classes.

Why

Doing this would mean we save on having to set typography in the component sass via govuk-font and potentially saves on custom styling we're applying to the component. An assessment will need to be made per heading to weigh the cost of applying a heading class and overriding most of it for a specific scenario.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when

colinrotherham commented 11 months ago

Thanks @owenatgov, that covers mostly __title and __heading elements

To remove more CSS, should we roll out .govuk-list and govuk-link defaults more widely too?

E.g. We currently duplicate styling for these lists and their children:

.govuk-error-summary__list
.govuk-footer__list
.govuk-pagination__list
.govuk-tabs__list

Maybe not custom .govuk-header__link or .govuk-pagination__link but also for links like:

.govuk-breadcrumbs__link
.govuk-footer__link
.govuk-notification-banner__link
.govuk-breadcrumbs__link

Probably what CSSNANO ends up doing for us anyway

owenatgov commented 11 months ago

@colinrotherham Good point. Do these feel like separate issues or should we have a single "does this already exist" issue?

colinrotherham commented 11 months ago

Don't mention the epic word