Version: blitz-dom 0.3.0-beta.2 (crates.io), viewport 1000×700, scale 1.
An <input type="number"> styled the same as its siblings lays out at 18 px tall while text, email and search inputs get 37.2 px (padding + line box), so a form's number field renders as a thin strip.
Repro
<!doctype html>
<style>
body { font: 16px sans-serif }
input { padding: .5rem .75rem; border: 1px solid #888; border-radius: 8px; font: inherit; width: 300px; display: block; margin: 8px }
</style>
<input type="text" value="text">
<input type="number" value="42">
<input type="email" value="a@b.c">
<input type="search" value="search">
BaseDocument::get_client_bounding_rect after resolve():
| input |
height |
| text |
37.2 |
| number |
18.0 |
| email |
37.2 |
| search |
37.2 |
Expected: all four the same height (Chrome/Firefox: identical boxes for this stylesheet).
Notes
layout/construct.rs sends "number" down the same create_text_editor(doc, id, false) path as "text", so the difference seems to come later (intrinsic size of the editor, or a UA rule); I did not find a type=number rule in assets/default.css.
Found while using Blitz as a headless test renderer for a server-rendered form component.
Version: blitz-dom 0.3.0-beta.2 (crates.io), viewport 1000×700, scale 1.
An
<input type="number">styled the same as its siblings lays out at 18 px tall whiletext,emailandsearchinputs get 37.2 px (padding + line box), so a form's number field renders as a thin strip.Repro
BaseDocument::get_client_bounding_rectafterresolve():Expected: all four the same height (Chrome/Firefox: identical boxes for this stylesheet).
Notes
layout/construct.rssends"number"down the samecreate_text_editor(doc, id, false)path as"text", so the difference seems to come later (intrinsic size of the editor, or a UA rule); I did not find atype=numberrule inassets/default.css.Found while using Blitz as a headless test renderer for a server-rendered form component.