ONSdigital / design-system

ONS Design System
https://service-manual.ons.gov.uk/design-system
MIT License
27 stars 17 forks source link

Add !important to single-purpose utility classes #3235

Open e-livingstone opened 2 weeks ago

e-livingstone commented 2 weeks ago

Background

This ticket is a result of spike #3172 and aims to address a performance testing issue.

Testing found that utility classes, along with their separate media queries, were adding too much bloat to the CSS.

Suggested solution

Add !important for single-purpose utility classes e.g. setting a color, margin or padding, to ensure these styles take precedence and are applied as intended.