{"version":3,"sources":["../../../src/govuk/settings/_colours-functional.scss"],"names":[],"mappings":"AAAA,GAAG;AACH,0BAA0B;AAC1B,GAAG;AACH,gBAAgB;AAChB,eAAe;AACf,gBAAgB;;AAEhB,8BAA8B;;AAE9B,gDAAgD;AAChD,EAAE;AACF,YAAY;AACZ,EAAE;AACF,4CAA4C;AAC5C,EAAE;AACF,iBAAiB;AACjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFC;;AAED,kEAAkE;AAClE,EAAE;AACF,4EAA4E;AAC5E,0BAA0B;AAC1B,EAAE;AACF,qDAAqD;AACrD,qDAAqD;AACrD,2CAA2C;AAC3C,kBAAkB;AAClB;EACE,sCAAsC;;EAEtC;IACE;MACE,mFAAmF;IACrF;EACF;;EAEA,sCAAsC;AACxC;;AAEA,6CAA6C;AAC7C,EAAE;AACF,6EAA6E;AAC7E,mCAAmC;AACnC,EAAE;AACF,qCAAqC;AACrC,+EAA+E;AAC/E,wEAAwE;AACxE,2EAA2E;AAC3E,EAAE;AACF,sEAAsE;AACtE,EAAE;AACF,4EAA4E;AAC5E,+EAA+E;AAC/E,4EAA4E;AAC5E,oBAAoB;AACpB,EAAE;AACF,8EAA8E;AAC9E,EAAE;AACF,gEAAgE;AAChE,iCAAiC;AACjC,qEAAqE;AACrE,+BAA+B;AAC/B,mFAAmF;AACnF,iEAAiE;AACjE,gEAAgE;AAChE,oBAAoB;AACpB,OAAO;AACP,EAAE;AACF,0CAA0C;AAC1C,EAAE;AACF,YAAY;AACZ,EAAE;AACF,iBAAiB;AACjB,qEAAqE;AACrE;;;CAGC;;AAED,+EAA+E;AAC/E,kBAAkB;AAClB,CAAC;AACD,2EAA2E;AAC3E,0EAA0E;AAC1E,2BAA2B;AAC3B,+EAA+E;;AAE/E,8EAA8E;AAC9E,4EAA4E;AAC5E,wDAAwD;;AAExD,wDAAwD;AACxD,EAAE;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8D;AAC9D,+DAA+D","file":"_colours-functional.scss","sourcesContent":["////\n/// @group settings/colours\n////\n@use \"sass:list\";\n@use \"sass:map\";\n@use \"sass:meta\";\n\n@import \"../settings/warnings\";\n\n/// Default definitions of the functional colours\n///\n/// @type Map\n///\n/// @see {variable} $govuk-functional-colours\n///\n/// @access public\n$govuk-default-functional-colours: (\n  (\n    \"brand\": (\n      name: \"blue\"\n    ),\n    \"text\": (\n      name: \"black\"\n    ),\n    // The background colour of the template. This is intended to be the same\n    // as `surface-background` for the purposes of making the Footer and Cookie\n    // banner components merge seamlessly with the template.\n    \"template-background\": (\n        name: \"blue\",\n        variant: \"tint-95\"\n      ),\n    \"body-background\": (\n      name: \"white\"\n    ),\n    // Use 'true black' to avoid printers using colour ink to print body text\n    \"print-text\": #000000,\n    // Used in for example 'muted' text and help text.\n    \"secondary-text\": (\n        name: \"black\",\n        variant: \"tint-25\"\n      ),\n    // Used for outline (and background, where appropriate) when interactive\n    // elements (links, form controls) have keyboard focus.\n    \"focus\": (\n        name: \"yellow\"\n      ),\n    // Ensure that the contrast between the text and background colour passes\n    // WCAG Level AA contrast requirements.\n    \"focus-text\": (\n        name: \"black\"\n      ),\n    // Used to highlight error messages and form controls in an error state\n    \"error\": (\n        name: \"red\"\n      ),\n    // Used to highlight success messages and banners\n    \"success\": (\n        name: \"green\"\n      ),\n    // Used in for example borders, separators, rules and keylines.\n    \"border\": (\n        name: \"black\",\n        variant: \"tint-80\"\n      ),\n    // Used for form inputs and controls\n    \"input-border\": (\n        name: \"black\"\n      ),\n    // Used for hover states on form controls\n    \"hover\": (\n        name: \"black\",\n        variant: \"tint-80\"\n      ),\n    // Standard links (on white)\n    \"link\": (\n        name: \"blue\",\n        variant: \"shade-10\"\n      ),\n    \"link-visited\": (\n      name: \"purple\"\n    ),\n    \"link-hover\": (\n      name: \"blue\",\n      variant: \"shade-50\"\n    ),\n    \"link-active\": (\n      name: \"black\"\n    ),\n    // 'Surfaces' are our name for components that have different colour\n    // palettes to typical page content. This is the generic surface.\n    \"surface-background\": (\n        name: \"blue\",\n        variant: \"tint-95\"\n      ),\n    \"surface-text\": (\n      name: \"black\"\n    ),\n    \"surface-border\": (\n      name: \"blue\",\n      variant: \"tint-50\"\n    )\n  )\n);\n\n/// Validates and merges functional colour overrides with defaults.\n///\n/// Throws an error if any provided colour name does not exist in the default\n/// functional colours map.\n///\n/// @param {Map} $colours Functional colour overrides.\n/// @param {Map} $defaults Default functional colours.\n/// @return {Map} Merged functional colours.\n/// @access private\n@function _govuk-define-functional-colours($colours, $defaults) {\n  $existing-colours: map.keys($defaults);\n\n  @each $colour-name, $colour in $colours {\n    @if not list.index($existing-colours, $colour-name) {\n      @error 'Unknown colour `#{$colour-name}` (available colours: #{$existing-colours})';\n    }\n  }\n\n  @return map.merge($defaults, $colours);\n}\n\n/// Functional colours for the GOV.UK palette.\n///\n/// Each functional colour is represented by a name (for example `'brand'`) to\n/// which the map associates either:\n///\n///   - a Sass colour (like `#1d70b8`)\n///   - a Sass map with a `name` and an optional `variant` properties, referring\n///     to one of the colours in the colour palette (like `(name: 'blue',\n///     variant: 'primary')`). `variant` defaults to `'primary'` if omitted.\n///\n/// Use the `govuk-functional-colour` function to access these colours.\n///\n/// Customise functional colours by defining $govuk-functional-colours with a\n/// map of the colours that you want to change before importing GOV.UK Frontend.\n/// These will then be merged with the default colours. You can only redefine\n/// existing colours.\n///\n/// @example scss – Redefining functional colours by setting them before import\n///\n///   // These will be merged with the default functional colours\n///   $govuk-functional-colours: (\n///     // set the 'brand' colour to the 'primary' variant of 'purple'\n///     brand: (name: 'purple'),\n///     // set the 'template-background' colour to the 'tint-95' variant of 'purple'\n///     template-background: (name: 'purple', variant: 'tint-95'),\n///     // set the 'text' colour to an arbitrary colour `#221133`\n///     text: #221133\n///   );\n///\n/// @see {function} govuk-functional-colour\n///\n/// @type Map\n///\n/// @access public\n$govuk-functional-colours: $govuk-default-functional-colours !default;\n$govuk-functional-colours: _govuk-define-functional-colours(\n  $govuk-functional-colours,\n  $defaults: $govuk-default-functional-colours\n);\n\n// =============================================================================\n// Legacy variables\n//\n// To help migrate to `govuk-functional-colour`, we're keeping the variables\n// which were previously storing the functional colours. This should reduce\n// breakage as teams upgrade\n// =============================================================================\n\n// Because the file may be imported multiple times, subsequent imports will see\n// the legacy variable and warn when they shouldn't so we need to track those\n$_govuk-deprecated-applied-colour-variables: () !default;\n\n/// Warn if a given legacy applied colour variable is set\n///\n/// @param {String} Name of variable to check\n/// @access private\n@mixin _warn-if-applied-colour-variable-set($functional-colour-name) {\n  @if not list.index($_govuk-deprecated-applied-colour-variables, $functional-colour-name) {\n    @if meta.variable-exists(\"govuk-#{$functional-colour-name}-colour\") {\n      $deprecation-message: \"Setting \\`$govuk-#{$functional-colour-name}-colour\\` no longer has any effect. Use \\`$govuk-functional-colours: (#{$functional-colour-name}: <NEW_COLOUR_VALUE>);\\` instead.\";\n\n      @include _warning(\"applied-colour-variables\", $deprecation-message);\n    }\n\n    $_govuk-deprecated-applied-colour-variables: list.append(\n      $_govuk-deprecated-applied-colour-variables,\n      $functional-colour-name\n    ) !global;\n  }\n}\n\n@include _warn-if-applied-colour-variable-set(brand);\n/// Brand colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(brand)`.\n$govuk-brand-colour: govuk-functional-colour(brand);\n\n@include _warn-if-applied-colour-variable-set(text);\n/// Text colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(text)`.\n$govuk-text-colour: govuk-functional-colour(text);\n\n@include _warn-if-applied-colour-variable-set(template-background);\n/// Template background colour\n///\n/// Used by components that want to give the illusion of extending\n/// the template background (such as the footer and cookie banner).\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(template-background)`.\n$govuk-template-background-colour: govuk-functional-colour(template-background);\n\n@include _warn-if-applied-colour-variable-set(body-background);\n/// Body background colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(body-background)`.\n$govuk-body-background-colour: govuk-functional-colour(body-background);\n\n@include _warn-if-applied-colour-variable-set(print-text);\n/// Text colour for print media\n///\n/// Use 'true black' to avoid printers using colour ink to print body text\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(print-text)`.\n$govuk-print-text-colour: govuk-functional-colour(print-text);\n\n@include _warn-if-applied-colour-variable-set(secondary-text);\n/// Secondary text colour\n///\n/// Used in for example 'muted' text and help text.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(secondary-text)`.\n$govuk-secondary-text-colour: govuk-functional-colour(secondary-text);\n\n@include _warn-if-applied-colour-variable-set(focus);\n/// Focus colour\n///\n/// Used for outline (and background, where appropriate) when interactive\n/// elements (links, form controls) have keyboard focus.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(focus)`.\n$govuk-focus-colour: govuk-functional-colour(focus);\n\n@include _warn-if-applied-colour-variable-set(focus-text);\n/// Focused text colour\n///\n/// Ensure that the contrast between the text and background colour passes\n/// WCAG Level AA contrast requirements.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(focus-text)`.\n$govuk-focus-text-colour: govuk-functional-colour(focus-text);\n\n@include _warn-if-applied-colour-variable-set(error);\n/// Error colour\n///\n/// Used to highlight error messages and form controls in an error state\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(error)`.\n$govuk-error-colour: govuk-functional-colour(error);\n\n@include _warn-if-applied-colour-variable-set(success);\n/// Success colour\n///\n/// Used to highlight success messages and banners\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(error)`.\n$govuk-success-colour: govuk-functional-colour(success);\n\n@include _warn-if-applied-colour-variable-set(border);\n/// Border colour\n///\n/// Used in for example borders, separators, rules and keylines.\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(border)`.\n$govuk-border-colour: govuk-functional-colour(border);\n\n@include _warn-if-applied-colour-variable-set(input-border);\n/// Input border colour\n///\n/// Used for form inputs and controls\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(input-border)`.\n$govuk-input-border-colour: govuk-functional-colour(input-border);\n\n@include _warn-if-applied-colour-variable-set(hover);\n/// Input hover colour\n///\n/// Used for hover states on form controls\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(hover)`.\n$govuk-hover-colour: govuk-functional-colour(hover);\n\n@include _warn-if-applied-colour-variable-set(link);\n/// Link colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(link)`.\n$govuk-link-colour: govuk-functional-colour(link);\n\n@include _warn-if-applied-colour-variable-set(link-visited);\n/// Visited link colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(link-visited)`.\n$govuk-link-visited-colour: govuk-functional-colour(link-visited);\n\n@include _warn-if-applied-colour-variable-set(link-hover);\n/// Link hover colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(link-hover)`.\n$govuk-link-hover-colour: govuk-functional-colour(link-hover);\n\n@include _warn-if-applied-colour-variable-set(link-active);\n/// Active link colour\n///\n/// @type Colour\n/// @access public\n/// @deprecated\n///   Variables for applied colours are deprecated. Please use the `govuk-functional-colour`\n///   function instead: `govuk-functional-colour(link-active)`.\n$govuk-link-active-colour: govuk-functional-colour(link-active);\n"]}
