Sha256: 0f17a70172657e0c9cedde098f81c594f75dbcb32e99fd2bc85299d5ced26dc0

Contents?: true

Size: 1.89 KB

Versions: 35

Compression:

Stored size: 1.89 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/input") {
  .govuk-input {
    @include govuk-font($size: 19);
    @include govuk-focusable;

    -webkit-box-sizing: border-box;

            box-sizing: border-box;
    width: 100%;
    height: 40px;
    margin-top: 0;

    padding: govuk-spacing(1);
    // setting any background-color makes text invisible when changing colours to dark backgrounds in Firefox (https://bugzilla.mozilla.org/show_bug.cgi?id=1335476)
    // as background-color and color need to always be set together, color should not be set either
    border: $govuk-border-width-form-element solid $govuk-input-border-colour;
    border-radius: 0;

    // Disable inner shadow and remove rounded corners
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
  }

  .govuk-input::-webkit-outer-spin-button,
  .govuk-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
  }

  .govuk-input[type="number"] {
    -moz-appearance: textfield;
  }

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

  // The ex measurements are based on the number of W's that can fit inside the input
  // Extra space is left on the right hand side to allow for the Safari prefill icon
  // Linear regression estimation based on visual tests: y = 1.76 + 1.81x

  .govuk-input--width-30 {
    max-width: 56ex + 3ex;
  }

  .govuk-input--width-20 {
    max-width: 38ex + 3ex;
  }

  .govuk-input--width-10 {
    max-width: 20ex + 3ex;
  }

  .govuk-input--width-5 {
    max-width: 10.8ex;
  }

  .govuk-input--width-4 {
    max-width: 9ex;
  }

  .govuk-input--width-3 {
    max-width: 7.2ex;
  }

  .govuk-input--width-2 {
    max-width: 5.4ex;
  }

}

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
govuk_publishing_components-11.0.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-10.2.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-10.1.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-10.0.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.28.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.27.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.26.1 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.26.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.25.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.24.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.23.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.22.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.21.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.20.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.19.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.18.0 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.17.1 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.17 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.16.1 node_modules/govuk-frontend/components/input/_input.scss
govuk_publishing_components-9.16.0 node_modules/govuk-frontend/components/input/_input.scss