we (web engine): Experimental web browser project to understand the limits of Claude

Form control layout and intrinsic sizing #148

open opened by pierrelf.com

Summary#

Implement layout for form controls as replaced/atomic inline-level elements with intrinsic dimensions.

Details#

Form controls are not normal flow elements — they are atomic inline-level boxes with intrinsic sizes determined by their type and content:

  • Text inputs: width from size attribute (default 20 characters), height from font metrics + padding
  • Textareas: width from cols attribute (default 20), height from rows attribute (default 2)
  • Buttons: sized to fit their content (text label) plus padding
  • Checkboxes/radio buttons: small fixed square (e.g., 13x13 CSS px)
  • Select dropdowns: width to fit longest option text, height like a single-line text input

Acceptance criteria#

  • Form controls participate in inline layout as atomic inline boxes
  • Each control type has correct default intrinsic dimensions
  • width / height CSS properties override intrinsic sizes
  • size attribute on <input> affects intrinsic width
  • rows / cols attributes on <textarea> affect intrinsic dimensions
  • <fieldset> and <legend> use block layout with correct legend positioning
  • Tests verify intrinsic sizing for each control type

Dependencies#

  • Form element parsing and DOM interfaces
sign up or login to add to the discussion
Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:meotu43t6usg4qdwzenk4s2t/sh.tangled.repo.issue/3mihoxqocmi2i