From d465dd47838a0696cbb7d75a1aeafd1b5f0afedb Mon Sep 17 00:00:00 2001 From: Alistair Laing Date: Wed, 12 Jun 2019 08:36:21 +0100 Subject: [PATCH] fixes v2 font name --- src/helpers/_font-faces.scss | 10 +++++----- src/helpers/_typography.scss | 6 +++--- src/helpers/typography.test.js | 10 +++++----- src/settings/_typography-font-families.scss | 4 ++-- src/settings/_typography-font.scss | 6 +++--- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/helpers/_font-faces.scss b/src/helpers/_font-faces.scss index 8ee344b981..0ab23db15a 100644 --- a/src/helpers/_font-faces.scss +++ b/src/helpers/_font-faces.scss @@ -7,20 +7,20 @@ @import "../tools/exports"; -/// Font Face - GOV.UK Transport +/// Font Face - GDS Transport /// -/// Outputs the font-face declaration for GOV.UK Transport at the root of the CSS document +/// Outputs the font-face declaration for GDS Transport at the root of the CSS document /// the first time it is called. /// /// @access private -@mixin _govuk-font-face-govuk-transport { +@mixin _govuk-font-face-gds-transport { @include govuk-exports("govuk/helpers/font-faces") { @at-root { /*! Copyright (c) 2011 by Margaret Calvert & Henrik Kubel. All rights reserved. The font has been customised for exclusive use on gov.uk. This cut is not commercially available. */ @font-face { - font-family: "GOVUKTransport"; + font-family: "GDS Transport"; src: govuk-font-url("light-68f0c84f0e-v2.woff2") format("woff2"), govuk-font-url("light-222368e53d-v2.woff") format("woff"); font-weight: normal; @@ -29,7 +29,7 @@ } @font-face { - font-family: "GOVUKTransport"; + font-family: "GDS Transport"; src: govuk-font-url("bold-9561e2d007-v2.woff2") format("woff2"), govuk-font-url("bold-5d3836b441-v2.woff") format("woff"); font-weight: bold; diff --git a/src/helpers/_typography.scss b/src/helpers/_typography.scss index 608074883e..76ab94a32d 100644 --- a/src/helpers/_typography.scss +++ b/src/helpers/_typography.scss @@ -17,14 +17,14 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; - // If the user is using the default GOV.UK Transport font we need to include + // If the user is using the default GDS Transport font we need to include // the font-face declarations. // - // We do not need to include the GOV.UK Transport font-face declarations if + // We do not need to include the GDS Transport font-face declarations if // alphagov/govuk_template is being used since nta will already be included by // default. @if ($govuk-include-default-font-face) { - @include _govuk-font-face-govuk-transport; + @include _govuk-font-face-gds-transport; } @include govuk-media-query($media-type: print) { diff --git a/src/helpers/typography.test.js b/src/helpers/typography.test.js index 21fa09a2b9..49e0bff0bb 100644 --- a/src/helpers/typography.test.js +++ b/src/helpers/typography.test.js @@ -63,8 +63,8 @@ describe('@mixin govuk-typography-common', () => { const resultsString = results.css.toString() expect(resultsString).toContain(`@font-face`) - expect(resultsString).toContain(`font-family: "GOVUKTransport"`) - expect(resultsString).toContain(`font-family: "GOVUKTransport"`) + expect(resultsString).toContain(`font-family: "GDS Transport"`) + expect(resultsString).toContain(`font-family: "GDS Transport"`) }) it('should not output a @font-face declaration when the user has changed their font', async () => { const sass = ` @@ -85,7 +85,7 @@ describe('@mixin govuk-typography-common', () => { const resultsString = results.css.toString() expect(resultsString).not.toContain(`@font-face`) - expect(resultsString).not.toContain(`font-family: "GOVUKTransport"`) + expect(resultsString).not.toContain(`font-family: "GDS Transport"`) expect(resultsString).not.toContain(`font-family: "ntatabularnumbers"`) }) it('should not output a @font-face declaration when the user wants compatibility with GOV.UK Template', async () => { @@ -127,8 +127,8 @@ describe('@mixin govuk-typography-common', () => { const resultsString = results.css.toString() expect(resultsString).not.toContain(`@font-face`) - expect(resultsString).toContain(`font-family: "GOVUKTransport"`) - expect(resultsString).toContain(`font-family: "GOVUKTransport"`) + expect(resultsString).toContain(`font-family: "GDS Transport"`) + expect(resultsString).toContain(`font-family: "GDS Transport"`) }) }) diff --git a/src/settings/_typography-font-families.scss b/src/settings/_typography-font-families.scss index 7da87be31c..23255b99bd 100644 --- a/src/settings/_typography-font-families.scss +++ b/src/settings/_typography-font-families.scss @@ -2,13 +2,13 @@ /// @group settings/typography //// -/// List of font families to use if using GOV.UK Transport (the default font +/// List of font families to use if using GDS Transport (the default font /// 'stack' for GOV.UK) /// /// @type List /// @access public -$govuk-font-family-govuk-transport: "GOVUKTransport", Arial, sans-serif; +$govuk-font-family-gds-transport: "GDS Transport", Arial, sans-serif; /// List of font families to use if using NTA (old font 'stack' for /// GOV.UK) diff --git a/src/settings/_typography-font.scss b/src/settings/_typography-font.scss index da5b4d2adc..07b9c1e3c3 100644 --- a/src/settings/_typography-font.scss +++ b/src/settings/_typography-font.scss @@ -31,7 +31,7 @@ $govuk-use-legacy-font: if(( $govuk-font-family: if($govuk-use-legacy-font, $govuk-font-family-nta, - $govuk-font-family-govuk-transport + $govuk-font-family-gds-transport ) !default; /// Font families to use when displaying tabular numbers @@ -54,13 +54,13 @@ $govuk-font-family-print: sans-serif !default; /// Include the default @font-face declarations /// /// If you have set $govuk-font-family to something other than -/// `$govuk-font-family-govuk-transport` this option is disabled by default. +/// `$govuk-font-family-gds-transport` this option is disabled by default. /// /// @type Boolean /// @access public $govuk-include-default-font-face: ( - $govuk-font-family == $govuk-font-family-govuk-transport + $govuk-font-family == $govuk-font-family-gds-transport ) !default; // =========================================================