Sha256: a39b9b27a6271a3e3dc10ba29d4c02061fa8c7482455ff4e52e8b210c7ccfe57

Contents?: true

Size: 1.94 KB

Versions: 6

Compression:

Stored size: 1.94 KB

Contents

.btn {
  align-items: center;
  background-color: var(--btn-background, var(--color-primary));
  border-color: var(--color-border);
  border-radius: var(--rounded-md);
  border-width: var(--btn-border-width, 0);
  color: var(--btn-color, var(--color-text-reversed));
  cursor: pointer;
  display: inline-flex;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  gap: var(--size-2);
  justify-content: center;
  min-inline-size: fit-content;
  padding: var(--size-2) var(--size-4);
  text-align: center;

  img {
    filter: var(--btn-icon-color, var(--color-filter-text-reversed));
  }

  &:focus-visible {
    outline: var(--border-2) solid var(--color-primary);
    outline-offset: var(--border-2);
  }

  &:disabled {
    opacity: var(--opacity-50);
    pointer-events: none;
  }
}

.btn--secondary {
  --btn-background: var(--color-secondary);
  --btn-color: var(--color-text);
  --btn-icon-color: var(--color-filter-text);
}

.btn--outline {
  --btn-background: var(--color-bg);
  --btn-border-width: var(--border);
  --btn-color: var(--color-text);
  --btn-icon-color: var(--color-filter-text);
}

.btn--plain {
  --btn-background: transparent;
  --btn-color: var(--color-text);
  --btn-icon-color: var(--color-filter-text);
}

.btn--positive {
  --btn-background: var(--color-positive);
  --btn-color: white;
  --btn-icon-color: var(--color-filter-positive);
}

.btn--negative {
  --btn-background: var(--color-negative);
  --btn-color: white;
  --btn-icon-color: var(--color-filter-negative);
}

.btn--loading {
  [aria-busy] &:disabled {
    position: relative;

    > * {
      visibility: hidden;
    }

    &::after {
      animation: var(--animate-spin);
      background-image: url("loader-circle.svg");
      background-size: cover;
      block-size: var(--size-4);
      content: "";
      filter: var(--btn-icon-color, var(--color-filter-text-reversed));
      inline-size: var(--size-4);
      margin-inline: auto;
      position: absolute;
    }
  }
}

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
css-zero-0.0.24 lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css
css-zero-0.0.23 lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css
css-zero-0.0.22 lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css
css-zero-0.0.21 lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css
css-zero-0.0.20 lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css
css-zero-0.0.19 lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css