Sha256: 68e0939c9e6f8eaa32c80504e542356269b56e5f98d4e3ce1ff4d2616f1f2faa

Contents?: true

Size: 1.6 KB

Versions: 143

Compression:

Stored size: 1.6 KB

Contents

@import "../../settings/all";
@import "../../tools/all";
@import "../../helpers/all";

@import "../error-message/error-message";
@import "../hint/hint";
@import "../label/label";

@include govuk-exports("govuk/component/textarea") {
  .govuk-textarea {
    @include govuk-font($size: 19, $line-height: 1.25);

    box-sizing: border-box; // should this be global?
    display: block;
    width: 100%;
    min-height: 40px;
    @include govuk-responsive-margin(6, "bottom");
    padding: govuk-spacing(1);

    resize: vertical;

    border: $govuk-border-width-form-element solid $govuk-input-border-colour;
    border-radius: 0;

    -webkit-appearance: none;

    &:focus {
      outline: $govuk-focus-width solid $govuk-focus-colour;
      // Ensure outline appears outside of the element
      outline-offset: 0;
      // Double the border by adding its width again. Use `box-shadow` to do
      // this instead of changing `border-width` (which changes element size) and
      // since `outline` is already used for the yellow focus state.
      box-shadow: inset 0 0 0 $govuk-border-width-form-element;

      @include govuk-if-ie8 {
        // IE8 doesn't support `box-shadow` so double the border with
        // `border-width`.
        border-width: $govuk-border-width-form-element * 2;
      }
    }
  }

  .govuk-textarea--error {
    border: $govuk-border-width-form-element-error solid $govuk-error-colour;

    &:focus {
      border-color: $govuk-input-border-colour;
      // Remove `box-shadow` inherited from `:focus` as `textarea--error`
      // already has the thicker border.
      box-shadow: none;
    }

  }
}

Version data entries

143 entries across 143 versions & 3 rubygems

Version Path
govuk_publishing_components-21.35.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.34.1 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.34.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.33.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.32.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.31.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.30.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.29.1 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.29.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.28.1 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.28.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.27.1 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.27.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.26.2 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.26.1 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.26.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.25.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.24.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.23.1 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss
govuk_publishing_components-21.23.0 node_modules/govuk-frontend/govuk/components/textarea/_textarea.scss