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.17k stars 320 forks source link

Facilitate setting extra classes on Summary List's key, value and action 'cells' #5019

Open romaricpascal opened 4 months ago

romaricpascal commented 4 months ago

What

Add top level options (for ex keyClasses, valueClasses and actionsClasses) to the Summary List's macro to allow setting extra classes on the key, value and actions of all rows.

Why

Classes can currently be set through the classes property of key/value/actions object in each of the rows. This is slightly cumbersome to implement when needing to adjust the width of a column (setting one of our width overrides, for example).

The current implementation would allow setting it only on the first row, thanks to the use of display:table-cell. However, this would be brittle should we decide to update how the component is laid out.

Who needs to work on this

Developers

Who needs to review this

Developers

Done when