Sha256: dac91e56d7c117baf2a40f6adb36ae3a0a3ad8de3b22c76702494981dbd6b9e4

Contents?: true

Size: 1.35 KB

Versions: 3

Compression:

Stored size: 1.35 KB

Contents

@layer components {
  .coco-button-wrapper {
    @apply !contents;
  }

  [data-coco].coco-button {
    @apply flex transition-colors w-auto bg-transparent text-current border border-transparent select-none flex-none no-underline outline-none focus-visible:outline-0;
    width: min-content;

    .button-inner {
      @apply inline-flex items-center text-center mx-auto gap-2;
      width: fit-content;
    }

    .button-content {
      @apply whitespace-nowrap relative leading-none inline-flex items-center order-2;
    }

    .button-state-content {
      @apply contents;
    }

    .button-icon {
      @apply inline-flex items-center order-1;
    }

    .button-dropdown {
      @apply contents rounded-md;
    }

    .button-toggle {
      @apply order-3;
    }

    /* disabled */

    &[data-disabled="true"] {
      @apply cursor-not-allowed pointer-events-none;
    }

    /* loading */

    &[data-state="loading"] .button-icon {
      @apply animate-spin;
    }

    /* Fit */

    &[data-fit="full"] {
      @apply w-full;
    }

    /* Icons */

    &[data-icon-position="end"] {
      .button-content {
        @apply order-1;
      }

      .button-icon {
        @apply order-2;
      }

      .button-toggle {
        @apply order-3;
      }
    }

    &.with-icon[data-collapsed="true"] {
      .button-content {
        display: none;
      }
    }
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
coveragebook_components-0.10.0 app/components/coco/base/button/button.css
coveragebook_components-0.9.1 app/components/coco/base/button/button.css
coveragebook_components-0.9.0 app/components/coco/base/button/button.css