Skip to content

Conversation

@FilisLiu
Copy link
Contributor

@FilisLiu FilisLiu commented Feb 10, 2026

What?

Added ds_grid

Why?

The design system needed a standardised way to create responsive grid layouts that match GOVUK and NHSUK design patterns.

How?

  • Created Grid component class with a shared WIDTHS constant defining all valid column widths (full, half, thirds, quarters) with their CSS classes and fractional values
  • Implemented generic builder that renders grid rows and columns using SafeBuffer.concat for safe HTML generation
  • Added validate_total_width! method using Rational numbers for precise width calculations

Testing?

All passed

Anything Else?

References:
https://service-manual.nhs.uk/design-system/styles/layout
https://design-system.service.gov.uk/styles/layout/

@FilisLiu FilisLiu changed the title Feature/grid ds_grid Feb 10, 2026
@FilisLiu FilisLiu marked this pull request as ready for review February 10, 2026 12:17
@FilisLiu FilisLiu changed the title ds_grid ds_grid helper Feb 10, 2026
@FilisLiu FilisLiu changed the title ds_grid helper Add ds_grid Feb 10, 2026
@FilisLiu FilisLiu merged commit c60905e into main Feb 10, 2026
1 of 3 checks passed
@FilisLiu FilisLiu deleted the feature/grid branch February 10, 2026 13:46
@FilisLiu FilisLiu linked an issue Feb 10, 2026 that may be closed by this pull request
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.

helper method to layout grids of different styles

2 participants