Sha256: 4552a48d5c4dfaddc1434aabe5d38e671f4e038ba6ee998a6da8b259cc4a1da7

Contents?: true

Size: 1.83 KB

Versions: 2

Compression:

Stored size: 1.83 KB

Contents

.btn {
  align-items: center;
  background-color: var(--btn-background, var(--color-primary));
  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;
  white-space: nowrap;
  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-selected-dark);
    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);
}

[aria-busy] .btn--loading:disabled {
  > * {
    visibility: hidden;
  }

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

  &::after {
    animation: spin 1s linear infinite;
    background-image: url("loader-circle.svg");
    background-size: cover;
    block-size: var(--size-4);
    content: "";
    inline-size: var(--size-4);
    position: absolute;
  }
}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
css-zero-0.0.35 lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css
css-zero-0.0.34 lib/generators/css_zero/add/templates/app/assets/stylesheets/button.css