Sha256: 8f193a6b3efbc790be8f7d0c29f4bf270e411f87eb284a2a02fc647bbd0187f0

Contents?: true

Size: 1.11 KB

Versions: 34

Compression:

Stored size: 1.11 KB

Contents

////
/// @group helpers/accessibility
////

/// Focused text
///
/// Provides an outline to clearly indicate when the target element is focused.
/// Used for interactive text-based elements.
///
/// @access public

@mixin govuk-focused-text {
  // When colours are overridden, for example when users have a dark mode,
  // backgrounds and box-shadows disappear, so we need to ensure there's a
  // transparent outline which will be set to a visible colour.

  // Since Internet Explorer 8 does not support box-shadow, we want to force the
  // user-agent outlines
  @include govuk-not-ie8 {
    outline: $govuk-focus-width solid transparent;
  }
  color: $govuk-focus-text-colour;
  background-color: $govuk-focus-colour;
  box-shadow: 0 -2px $govuk-focus-colour, 0 4px $govuk-focus-text-colour;
  // When link is focussed, hide the default underline since the
  // box shadow adds the "underline"
  text-decoration: none;

  // When a focused box is broken by e.g. a line break, ensure that the
  // box-shadow is applied to each fragment independently.
  -webkit-box-decoration-break: clone;
          box-decoration-break: clone;
}

Version data entries

34 entries across 34 versions & 3 rubygems

Version Path
govuk_tech_docs-3.4.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-35.3.3 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-35.3.2 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-35.3.1 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-35.3.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_tech_docs-3.3.1 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-35.2.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
katalyst-govuk-formbuilder-1.4.0 vendor/assets/stylesheets/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-35.1.1 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-35.1.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-35.0.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-34.14.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-34.13.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-34.12.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-34.11.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-34.10.1 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-34.10.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-34.9.1 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-34.9.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-34.8.1 node_modules/govuk-frontend/govuk/helpers/_focused.scss