Sha256: a445d2d0c44c64f922064ae2fae7b8ab324caaa2b9b349634c8d7093d1f130c1

Contents?: true

Size: 911 Bytes

Versions: 143

Compression:

Stored size: 911 Bytes

Contents

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

/// 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;
}

Version data entries

143 entries across 143 versions & 3 rubygems

Version Path
govuk_tech_docs-2.2.2 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_tech_docs-2.2.1 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_tech_docs-2.2.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_tech_docs-2.1.1 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_tech_docs-2.1.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_tech_docs-2.0.13 node_modules/govuk-frontend/govuk/helpers/_focused.scss
dxw_govuk_frontend_rails-3.6.0 vendor/assets/stylesheets/helpers/_focused.scss
dxw_govuk_frontend_rails-3.5.0 vendor/assets/stylesheets/helpers/_focused.scss
govuk_publishing_components-21.54.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.53.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.52.1 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.52.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.51.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.50.1 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.50.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.49.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.48.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.47.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.46.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss
govuk_publishing_components-21.45.0 node_modules/govuk-frontend/govuk/helpers/_focused.scss