Sha256: e1ceb888032324580cc6159cd264cd55715d640584d2ee7c5632eaf071595cc9

Contents?: true

Size: 1.64 KB

Versions: 24

Compression:

Stored size: 1.64 KB

Contents

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

@include govuk-exports("govuk/component/file-upload") {
  $component-padding: govuk-spacing(1);

  .govuk-file-upload {
    @include govuk-font($size: 19);
    @include govuk-text-colour;
    max-width: 100%;
    margin-left: -$component-padding;
    padding: $component-padding;

    // The default file upload button in Safari does not
    // support setting a custom font-size. Set `-webkit-appearance`
    // to `button` to drop out of the native appearance so the
    // font-size is set to 19px
    // https://bugs.webkit.org/show_bug.cgi?id=224746
    &::-webkit-file-upload-button {
      -webkit-appearance: button;
      color: inherit;
      font: inherit;
    }

    &:focus {
      outline: $govuk-focus-width solid $govuk-focus-colour;
      // Use `box-shadow` to add border 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 4px $govuk-input-border-colour;
    }

    // Set "focus-within" to fix https://bugzilla.mozilla.org/show_bug.cgi?id=1430196
    // so that component receives focus in Firefox.
    // This can't be set together with `:focus` as all versions of IE fail
    // to recognise `focus-within` and don't set any styles from the block
    // when it's a selector.
    &:focus-within {
      outline: $govuk-focus-width solid $govuk-focus-colour;

      box-shadow: inset 0 0 0 4px $govuk-input-border-colour;
    }

    &:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
  }
}

/*# sourceMappingURL=_index.scss.map */

Version data entries

24 entries across 22 versions & 3 rubygems

Version Path
govuk_publishing_components-42.1.0 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
govuk_publishing_components-42.0.0 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
govuk_publishing_components-41.1.2 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
govuk_publishing_components-41.1.1 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
govuk_publishing_components-41.1.0 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
govuk_publishing_components-41.0.0 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
govuk_publishing_components-40.1.0 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
katalyst-govuk-formbuilder-1.10.2 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
govuk_publishing_components-40.0.0 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
katalyst-govuk-formbuilder-1.10.1 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
katalyst-govuk-formbuilder-1.10.0 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
katalyst-govuk-formbuilder-1.9.4 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
defra_ruby_template-5.4.1 vendor/assets/stylesheets/components/file-upload/_index.scss
defra_ruby_template-5.4.1 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
defra_ruby_template-5.4.0 vendor/assets/stylesheets/components/file-upload/_index.scss
defra_ruby_template-5.4.0 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
katalyst-govuk-formbuilder-1.9.3 node_modules/govuk-frontend/dist/govuk/components/file-upload/_index.scss
katalyst-govuk-formbuilder-1.9.1 vendor/assets/stylesheets/govuk-frontend/dist/govuk/components/file-upload/_index.scss
katalyst-govuk-formbuilder-1.9.0 vendor/assets/stylesheets/govuk-frontend/dist/govuk/components/file-upload/_index.scss
katalyst-govuk-formbuilder-1.8.1 vendor/assets/stylesheets/govuk-frontend/dist/govuk/components/file-upload/_index.scss