Sha256: 6e9437af7380d8ac5761c58786f738713a1da5445b6d62b7a5c55a1c4db0af06

Contents?: true

Size: 1.62 KB

Versions: 206

Compression:

Stored size: 1.62 KB

Contents

@include govuk-exports("govuk/component/warning-text") {
  .govuk-warning-text {
    position: relative;
    @include govuk-responsive-margin(6, "bottom");
    padding: govuk-spacing(2) 0;
  }

  .govuk-warning-text__assistive {
    @include govuk-visually-hidden;
  }

  .govuk-warning-text__icon {
    @include govuk-font($size: false, $weight: bold);

    box-sizing: border-box;

    display: inline-block;

    position: absolute;
    left: 0;

    min-width: 35px;
    min-height: 35px;
    margin-top: -7px;

    @include govuk-media-query($from: tablet) {
      margin-top: -5px;
    }

    // When a user customises their colours the background colour will often be removed.
    // Adding a border to the component keeps it's shape as a circle.
    border: 3px solid govuk-colour("black");
    border-radius: 50%;

    color: govuk-colour("white");
    background: govuk-colour("black");

    font-size: 30px;
    line-height: 29px;

    text-align: center;

    // Prevent the exclamation mark from being included when the warning text
    // is copied, for example.
    -webkit-user-select: none;
        -ms-user-select: none;
            user-select: none;

    // Improve rendering in Windows High Contrast Mode (Edge), where a
    // readability backplate behind the exclamation mark obscures the circle
    forced-color-adjust: none;

    @media screen and (forced-colors: active) {
      border-color: windowText;
      color: windowText;
      background: transparent;
    }
  }

  .govuk-warning-text__text {
    @include govuk-font($size: 19, $weight: bold);
    @include govuk-text-colour;
    display: block;
    padding-left: 45px;
  }
}

Version data entries

206 entries across 203 versions & 5 rubygems

Version Path
defra_ruby_template-3.15.1 vendor/assets/stylesheets/components/warning-text/_index.scss
defra_ruby_template-3.15.1 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_tech_docs-3.5.0 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_tech_docs-3.4.5 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
defra_ruby_template-3.15.0 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
defra_ruby_template-3.15.0 vendor/assets/stylesheets/components/warning-text/_index.scss
govuk_publishing_components-37.3.1 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-37.3.0 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-37.2.4 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-37.2.3 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-37.2.2 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-37.2.1 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-37.2.0 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-37.1.1 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-37.1.0 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-37.0.0 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-36.1.0 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-36.0.3 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-36.0.2 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss
govuk_publishing_components-36.0.1 node_modules/govuk-frontend/govuk/components/warning-text/_index.scss