Sha256: 06391af95919583618311318a2c7df9bf597a5697b4f5089eab63e064c564d8a

Contents?: true

Size: 1.75 KB

Versions: 3

Compression:

Stored size: 1.75 KB

Contents

.input {
  appearance: none;
  background-color: var(--color-bg);
  border: var(--border) solid var(--color-border);
  border-radius: var(--rounded-md);
  font-size: var(--text-sm);
  inline-size: var(--size-full);
  padding: var(--size-2) var(--size-3);

  option {
    padding-block: revert;
  }

  &:is(textarea[rows=auto]) {
    field-sizing: content;
    max-block-size: calc(10lh + var(--size-6));
    min-block-size: calc(3lh  + var(--size-6));
  }

  &:is(select):not([multiple], [size]) {
    background-image: url("select-arrow.svg");
    background-position: center right var(--size-2);
    background-repeat: no-repeat;
    background-size: var(--size-4) auto;
  }

  &::file-selector-button {
    font-weight: var(--font-medium);
    margin-inline-end: var(--size-2);
  }

  &:user-invalid {
    border-color: var(--color-negative);
  }

  &:user-invalid ~ .invalid-feedback {
    display: block;
  }

  &:disabled {
    cursor: not-allowed;
    opacity: var(--opacity-50);
  }
}

/* Hide invalid feedback by default */
.invalid-feedback {
  display: none;
}

/* Containers that act like (and contain) inputs */
.input--actor {
  &:focus-within {
    outline: var(--border-2) solid var(--color-selected-dark);
    outline-offset: var(--border-2);
  }

  .input__character {
    border: 0; inline-size: 100%; outline: 0;
  }
}

/* Checkbox, radio, and range */
.checkbox, .radio {
  accent-color: var(--color-primary);
  transform: scale(1.15);
}

.range {
  accent-color: var(--color-primary);
}

/* Styles that are shared between components */
:is(.input, .checkbox, .radio, .range) {
  &:focus-visible {
    outline: var(--border-2) solid var(--color-selected-dark);
    outline-offset: var(--border-2);
  }

  .field_with_errors & {
    border-color: var(--color-negative);
  }
}

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
css-zero-0.0.38 lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
css-zero-0.0.37 lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
css-zero-0.0.36 lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css