Skip to main content

Harshal V. LADHE

Building HTML Forms

Accessible, well-styled HTML forms and the native controls inside them.

Content tagged forms

  • Tutorial:Auto-Growing Textareas with CSS field-sizing: content

    Auto-grow textareas with one line of CSS, no JavaScript.
    Make a textarea grow and shrink with its text using CSS field-sizing: content: no scrollHeight JavaScript, plus size limits, fallbacks and browser support.
    Published at:
    Categories:CSS
    Estimated reading time:8 min read
  • Tutorial:Styling a <select> Dropdown with CSS appearance: base-select

    Style a real select's dropdown, options and arrow.
    appearance: base-select opts a native <select> into a fully styleable mode — rich HTML in options, <selectedcontent> in the closed button, and ::picker(select), ::picker-icon and ::checkmark for the dropdown, arrow and tick — while keeping its keyboard support, accessibility and form behaviour, with a plain select as the fallback.
    Published at:
    Categories:CSS
    Estimated reading time:9 min read
  • Tutorial:Theming Native Controls with accent-color

    Theme native checkboxes, radios and sliders with one property.
    The accent-color property themes the checked and filled parts of native checkboxes, radio buttons, switches, range sliders and progress bars — including their indeterminate states — while keeping real browser controls with full native behaviour and accessibility, plus how it pairs with color-scheme and what it leaves alone.
    Published at:
    Categories:CSS
    Estimated reading time:8 min read