Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow certain (header) component variables to be overridden. #1993

Closed
wants to merge 1 commit into from

Conversation

codebymikey
Copy link

This issue also affects other components which might need certain variables to be overridden.

Unsure about the use of the !global flag as that assigns the variable globally if it's not already defined.

This quick regex ^\h+\$[\w-]+: may be used to find locally defined component variables that can potentially be made to be overridden as needed.

@hannalaakso hannalaakso added the awaiting triage Needs triaging by team label Oct 20, 2020
@kellylee-gds kellylee-gds removed the awaiting triage Needs triaging by team label Oct 26, 2020
@36degrees
Copy link
Contributor

@codebymikey thanks for taking the time to raise this.

I think this is something that we'd need to look at across the entire system – as you say, this issue affects most of the components.

It'd be helpful if we could understand your use case – what is it you're trying to achieve that requires you to override the header's variables?

@codebymikey
Copy link
Author

Hi @36degrees,

I'm essentially creating a theme for potential government platforms and using the govuk-frontend framework as its foundation over a framework like Bootstrap 4 mainly for the look-and-feel and accessibility features.

However not all clients might want to use the typical colour schemes and it'd be nice if the framework was flexible enough to allow certain component styles to be overridden without having to replace/override the whole component.

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-fronte-patch-1-bappdujhp November 30, 2020 13:42 Inactive
@colinrotherham
Copy link
Contributor

Hi @codebymikey

Thanks again for opening this one, appreciate it's been a long time since we've replied

We've met to discuss whether we'd want the Header component to have colour overrides but really we see this component as the header for all GOV.UK services—always displayed as a "black bar with blue underline"

At the top of the Header component (Design System page) we say:

The GOV.UK header shows users that they are on GOV.UK and which service they are using.

So definitely do continue to use our component if you're running a GOV.UK service, but if you need customisable colour themes for your clients we'd rather you made your own.

Appreciate the contribution though, and it's good to document these things so I'll link to:

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.

None yet

6 participants