Sha256: c9d63b4d997a8b96297f8c326fc7f0299c45ccae34d0e27431af91bbd4c6c0b6

Contents?: true

Size: 1.81 KB

Versions: 1

Compression:

Stored size: 1.81 KB

Contents

// Form validation
// ==========================================================================

// Using the classname .error as it's shorter than .validation and easier to type!
.error {

  // Ensure the .error class is applied to .form-group, otherwide box-sizing(border-box) will need to be used
  // @include box-sizing(border-box);
  margin-right: 15px;

  // Error messages should be red and bold
  .error-message {
    color: $error-colour;
    font-weight: bold;
  }

  // Form inputs should have a red border
  .form-control {
    border: 4px solid $error-colour;
  }

  .form-hint {
    margin-bottom: 0;
  }

}

.error,
.error-summary {

  // Add a red border to the left of the field
  border-left: 4px solid $error-colour;
  padding-left: 10px;

  @include media(tablet) {
    border-left: 5px solid $error-colour;
    padding-left: $gutter-half;
  }
}

.error-message {
  @include core-19;

  display: block;
  clear: both;

  margin: 0;
  padding: 5px 0 7px 0;
}

// Summary of multiple error messages
.error-summary {

  // Error summary has a border on all sides
  border: 4px solid $error-colour;

  margin-top: $gutter-half;
  margin-bottom: $gutter-half;

  padding: $gutter-half 10px;

  @include media(tablet) {
    border: 5px solid $error-colour;

    margin-top: $gutter;
    margin-bottom: $gutter;

    padding: 20px $gutter-half $gutter-half $gutter-half;
  }

  @include ie-lte(6) {
    zoom: 1;
  }

  // Use the GOV.UK outline focus style
  &:focus {
    outline: 3px solid $focus-colour;
  }

  .error-summary-heading {
    margin-top: 0;
  }

  p {
    margin-bottom: 10px;
  }

  .error-summary-list {
    padding-left: 0;

    li {

      @include media(tablet) {
        margin-bottom: 5px;
      }
    }

    a {
      color: $error-colour;
      font-weight: bold;
      text-decoration: underline;
    }
  }
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
govuk_elements_rails-1.1.2 vendor/assets/stylesheets/elements/forms/_form-validation.scss