Skip to content

Commit

Permalink
Link colour palette to compatibility mode
Browse files Browse the repository at this point in the history
  • Loading branch information
36degrees committed Apr 29, 2019
1 parent bb63dba commit 351d11d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/helpers/_colour.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@import "../settings/compatibility";
@import "../settings/colours-palette";
@import "../settings/colours-organisations";

Expand Down
6 changes: 5 additions & 1 deletion src/settings/_colours-palette.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
/// @type Boolean
/// @access public

$govuk-use-legacy-palette: true !default;
$govuk-use-legacy-palette: if((
$govuk-compatibility-govukfrontendtoolkit or
$govuk-compatibility-govuktemplate or
$govuk-compatibility-govukelements
), true, false) !default;

/// Legacy colour palette
///
Expand Down
1 change: 1 addition & 0 deletions src/settings/colours.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const sassConfig = {
describe('Organisation colours', () => {
it('should define websafe colours that meet contrast requirements', async () => {
const sass = `
@import "settings/compatibility";
@import "settings/colours-palette";
@import "settings/colours-organisations";
@import "settings/colours-applied";
Expand Down

0 comments on commit 351d11d

Please sign in to comment.