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. 10 elements, each rendered live with its source and the one thing that breaks it.

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