Sha256: 7c4d3d7076a51b7d1636d442bdfd1c256ca855ce8421ac666dd5fbf2c6105b1f

Contents?: true

Size: 1.34 KB

Versions: 2

Compression:

Stored size: 1.34 KB

Contents

.sheet {
  background-color: var(--color-bg);
  border-inline-start-width: var(--border);
  box-shadow: var(--shadow-lg);
  block-size: var(--size-full);
  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.33 lib/generators/css_zero/add/templates/app/assets/stylesheets/sheet.css
css-zero-0.0.32 lib/generators/css_zero/add/templates/app/assets/stylesheets/sheet.css