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

Set $govuk-font-family to a different font stack before importing govuk-frontend to override the font stack #90

Closed
bsaadat opened this issue Apr 28, 2020 · 3 comments · Fixed by #120
Assignees
Labels
enhancement New feature or request

Comments

@bsaadat
Copy link

bsaadat commented Apr 28, 2020

Set $govuk-font-family to a different font stack before importing govuk-frontend to override the font stack

@bsaadat bsaadat created this issue from a note in Coronavirus dashboard (Awaiting development) Apr 28, 2020
@bsaadat bsaadat added the enhancement New feature or request label Apr 28, 2020
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
@MikeCoats
Copy link
Contributor

I've moved the font stack declaration from the body tag to the govuk-frontend variable, but this has shown up a couple of places where the govuk classes haven't been used on the text.

image

To make it more obvious, I changed the govuk font to an unreadable one,

-$govuk-font-family: "GDS Transport", Arial, sans-serif;
+$govuk-font-family: "Webdings";

So now, I'm going to fix any element that's still 'readable', to make sure the correct govuk classes have been applied. It looks like the BigNumber and PageTitle components are the culprits.

image

@MikeCoats
Copy link
Contributor

It looks like the charts' tooltips are also 'unstyled' by this change.

image

image

MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
This element ended-up being unstyled by moving the font stack from
body element to the govuk-frontend variable.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
This element also ended-up being unstyled by moving the font stack from
body element to the govuk-frontend variable.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
These tooltips ended up being un-styled by moving the font stack from
body element to the govuk-frontend variable. This adds the govuk classes
to the tooltips and adds some element specific css overrides to restore
the colours and sizes.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
These tooltips ended up being un-styled by moving the font stack from
body element to the govuk-frontend variable. This adds the govuk classes
to the tooltips and adds some element specific css overrides to restore
the colours and sizes.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
These tooltips ended up being un-styled by moving the font stack from
body element to the govuk-frontend variable. This adds the govuk classes
to the tooltips and adds some element specific css overrides to restore
the colours and sizes.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
These tooltips ended up being un-styled by moving the font stack from
body element to the govuk-frontend variable. This adds the govuk classes
to the tooltips and adds some element specific css overrides to restore
the colours and sizes.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
This element ended-up being unstyled by moving the font stack from
body element to the govuk-frontend variable.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
This element also ended-up being unstyled by moving the font stack from
body element to the govuk-frontend variable.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
These tooltips ended up being un-styled by moving the font stack from
body element to the govuk-frontend variable. This adds the govuk classes
to the tooltips and adds some element specific css overrides to restore
the colours and sizes.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
These tooltips ended up being un-styled by moving the font stack from
body element to the govuk-frontend variable. This adds the govuk classes
to the tooltips and adds some element specific css overrides to restore
the colours and sizes.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
These tooltips ended up being un-styled by moving the font stack from
body element to the govuk-frontend variable. This adds the govuk classes
to the tooltips and adds some element specific css overrides to restore
the colours and sizes.

Issue: UKHSA-Internal#90
MikeCoats added a commit to MikeCoats/coronavirus-dashboard that referenced this issue Apr 29, 2020
These tooltips ended up being un-styled by moving the font stack from
body element to the govuk-frontend variable. This adds the govuk classes
to the tooltips and adds some element specific css overrides to restore
the colours and sizes.

Issue: UKHSA-Internal#90
xenatisch added a commit that referenced this issue Apr 30, 2020
Use `$govuk-font-family` across the service (issue #90) - with thanks to @MikeCoats for the contribution. 

No conflict detected.
@GeraldMercieca GeraldMercieca removed this from Awaiting development in Coronavirus dashboard Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants