WebCraft

TAG ยท form

Styling form fields in CSS

Range sliders, selects, checkboxes, floating labels and error states, each shown live with the code and the browser that breaks it. 9 elements, each rendered live with its source and the one thing that breaks it.

  1. A pricing card that is still a radio :has(:checked)
  2. A select you can finally style appearance: base-select
  3. The filled half of a range track ::-moz-range-progress
  4. A textarea that grows as you type field-sizing: content
  5. A switch that is still a checkbox appearance: none
  6. A range slider you can actually style ::-webkit-slider-thumb, ::-moz-range-thumb
  7. An error state that waits its turn :user-invalid
  8. Native controls in your palette accent-color
  9. A label that floats out of the way :placeholder-shown