Skip to content

[WIP] Add reverse modifiers to form controls#1914

Draft
colinrotherham wants to merge 23 commits into
component-optionsfrom
form-reverse
Draft

[WIP] Add reverse modifiers to form controls#1914
colinrotherham wants to merge 23 commits into
component-optionsfrom
form-reverse

Conversation

@colinrotherham
Copy link
Copy Markdown
Contributor

Description

This PR adds --reverse modifier support to all form controls

Work might be split out of this PR to support dark mode

  • Character count
  • Checkboxes
  • Date input
  • File upload
  • Input
  • Password input
  • Radios
  • Select
  • Textarea

With reverse support also added to:

  • Error message
  • Error summary
  • Form group
  • Hint
  • Label
  • Legend
Reverse form styles

Checklist

@colinrotherham colinrotherham changed the title Add reverse modifiers to form controls [WIP] Add reverse modifiers to form controls Apr 30, 2026
@colinrotherham colinrotherham temporarily deployed to nhsuk-frontend-pr-1914 April 30, 2026 15:18 Inactive
@paulrobertlloyd
Copy link
Copy Markdown
Contributor

Is there a demo page in the review app to see all reversed form controls?

The contrast on the above screenshot seem very low, almost like the controls are disabled.

I wonder if there needs to be different approaches, one for reversed form components (if needed?) and another for dark mode (which are needed).

@colinrotherham
Copy link
Copy Markdown
Contributor Author

colinrotherham commented May 1, 2026

@paulrobertlloyd Just the component review pages now updated to show reverse styles:

The contrast on the above screenshot seem very low, almost like the controls are disabled.

Yeah the blue is fairly awful so please consider this as a WIP step towards dark mode

All examples are meeting the 4.5:1 contrast ratio (Level AA) but it'll look a lot better on black

I wonder if there needs to be different approaches, one for reversed form components (if needed?) and another for dark mode (which are needed).

Exactly this. Our current "reverse" approach (e.g. header search white input on a blue background) doesn't work with color: currentcolor; because both the text colour and input background colour are the same 😬

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

@colinrotherham colinrotherham force-pushed the component-options branch 5 times, most recently from 402789d to 66344f7 Compare May 22, 2026 11:35
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.

2 participants