Sha256: 550d16a24581fbf37b37516d664ceed28ace06f6cfac12015ebebb495826e23b

Contents?: true

Size: 1.62 KB

Versions: 48

Compression:

Stored size: 1.62 KB

Contents

.govuk-image-field {
  display: grid;
  grid-template-areas:
    "label preview"
    "hint preview"
    "error preview"
    "file preview"
    "supplemental supplemental";
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 0 1rem;
  max-width: var(--text-width);

  label {
    grid-area: label;
  }

  .govuk-hint {
    grid-area: hint;
  }

  .govuk-error-message {
    grid-area: error;
  }

  input {
    grid-area: file;
    align-self: start;
  }

  .govuk-file-upload {
    margin-left: 0;
    padding: 3px;
  }

  .preview-image {
    grid-area: preview;
    position: relative;
    display: grid;
    overflow: visible;
    align-self: start;
    align-items: center;
    justify-items: center;
    background-color: #f4f4f4;
    border: 2px solid black;

    min-width: calc(8rem + 4px);
    min-height: calc(8rem + 4px);

    .image-thumbnail {
      max-width: 8rem;
      max-height: 8rem;
    }

    .file-destroy {
      appearance: none;
      position: absolute;
      background-color: rgba(0, 0, 0, 0.6);
      color: white;
      border-radius: 1rem;
      border: none;
      display: block;
      padding: 0;
      bottom: -10px;
      right: 50%;
      margin-right: -10px;

      &::after {
        content: "×";
        display: block;
        position: relative;
        width: 21px;
        line-height: 21px;
        font-size: 21px;
        top: -1px;
      }
    }
  }

  > div:last-child {
    grid-area: supplemental;
  }

  .govuk-form-group {
    margin-top: 30px;
  }

  .preview-image.hidden {
    display: block !important;

    .file-destroy {
      display: none;
    }
  }
}

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
katalyst-koi-4.14.1 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.14.0 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.13.2 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.13.0 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.12.6 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.12.5 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.12.4 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.12.3 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.12.2 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.12.1 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.12.0 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.11.2 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.11.1 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.11.0 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.10.3 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.10.2 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.10.1 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.10.0 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.9.5 app/assets/stylesheets/koi/components/_image-field.scss
katalyst-koi-4.9.4 app/assets/stylesheets/koi/components/_image-field.scss