Sha256: de9da2c97010ef484a75c076708a335b49b1bf306c71e150ac4b2b3ae3399d6e

Contents?: true

Size: 1.33 KB

Versions: 2

Compression:

Stored size: 1.33 KB

Contents

.sheet {
  background-color: var(--color-bg);
  border-inline-start-width: var(--border);
  box-shadow: var(--shadow-lg);
  block-size: 100%;
  color: var(--color-text);
  inline-size: var(--size-3-4);
  margin-inline: var(--sheet-margin);
  max-block-size: none;
  max-inline-size: var(--width-sm);
  padding: var(--size-6);

  &::backdrop {
    background-color: rgba(0, 0, 0, .8);
  }

  /* Setup animation */
  transform: var(--sheet-transform);
  transition-behavior: allow-discrete;
  transition-duration: var(--time-500);
  transition-property: display, overlay, transform;

  &::backdrop {
    opacity: 0;
    transition-behavior: allow-discrete;
    transition-duration: var(--time-150);
    transition-property: display, overlay, opacity;
  }

  /* In animation */
  &[open] {
    transform: translateX(0);
  }

  &[open]::backdrop {
    opacity: 1;
  }

  /* Out animation */
  @starting-style {
    &[open] {
      transform: var(--sheet-transform);
    }

    &[open]::backdrop {
      opacity: 0;
    }
  }

  @media (width < 40rem) {
    max-inline-size: none;
  }
}

.sheet--left {
  --sheet-margin: 0 auto;
  --sheet-transform: translateX(-100%);
}

.sheet--right {
  --sheet-margin: auto 0;
  --sheet-transform: translateX(100%);
}

.sheet__close {
  inset-block-start: var(--size-4);
  inset-inline-end: var(--size-4);
  position: absolute;
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
css-zero-0.0.31 lib/generators/css_zero/add/templates/app/assets/stylesheets/sheet.css
css-zero-0.0.30 lib/generators/css_zero/add/templates/app/assets/stylesheets/sheet.css