Sha256: d9e789036c961271a965005535e843c80ddda85d6716491227108262c908b328

Contents?: true

Size: 1.94 KB

Versions: 5

Compression:

Stored size: 1.94 KB

Contents

.input {
  appearance: none;
  background-color: var(--input-background, var(--color-bg));
  border: 1px solid var(--input-border-color, var(--color-border));
  border-radius: var(--input-radius, var(--rounded-md));
  font-size: var(--input-font-size, var(--text-sm));
  inline-size: var(--size-full);
  padding: var(--input-padding, 0.5rem 1rem);

  option {
    padding-block: 2px;
  }

  &: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: flex;
  }

  &: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 {
  input {
    border: 0; inline-size: 100%; outline: 0;
  }

  img:not([class]) {
    filter: var(--input-icon-color, var(--color-filter-text));
  }

  &:focus-within {
    outline: var(--input-outline-size, 2px) solid var(--color-selected-dark);
    outline-offset: var(--border-2);
  }
}

/* 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(--input-outline-size, 2px) solid var(--color-selected-dark);
    outline-offset: var(--border-2);
  }

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
css-zero-0.0.55 lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
css-zero-0.0.54 lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
css-zero-0.0.53 lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
css-zero-0.0.52 lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css
css-zero-0.0.51 lib/generators/css_zero/add/templates/app/assets/stylesheets/input.css