Closed
Bug 1450173
Opened 6 years ago
Closed 5 years ago
input with date/time type doesn't center its contents, with "text-align:center"
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
RESOLVED
FIXED
mozilla70
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: karlcow, Assigned: emilio)
References
(Blocks 1 open bug, )
Details
(Whiteboard: [webcompat] )
Attachments
(2 files)
This is a spin-off of https://webcompat.com/issues/16209 Test case is at https://codepen.io/webcompat/pen/MVVeZr?editors=1100 <fieldset> <label> <input value="2018-03-30" type="date"> </label> <label> <input value="05:15" type="time"> </label> </fieldset> with label {display:flex; align-items:center;} input {flex: 1 0 auto; text-align:center;} In Chrome both fields are centered. In Firefox they are left aligned.
Flags: webcompat?
Comment 1•6 years ago
|
||
I guess the author is expecting "text-align:center" to center the contents of the input? That's a somewhat reasonable expectation, though I don't know if the precise layout of these controls is specced at all. (I don't recall the precise setup of the internals of these datetime widgets -- I think there's a flex container and there's a flex item (or maybe several) for the text and a flex item for the "x" clear-icon. For "text-align" to have an effect, we'd need to be sure that property inherits down to a block around *just* the text, and we'd need that block to be as wide (or nearly as wide) as the input widget itself.)
Comment 2•6 years ago
|
||
Reduced testcase jsfiddle: https://jsfiddle.net/aj5drx4t/ Or just as data URI: data:text/html,<input type="date" style="width:30em; text-align:center"> The "mm/dd/yyyy" text is centered in Chrome and Edge, but not in Firefox.
Summary: input with date/time type are not centered → input with date/time type doesn't center its contents, with "text-align:center"
Updated•6 years ago
|
Depends on: datetime-bugs
Updated•6 years ago
|
Blocks: datetime-bugs
No longer depends on: datetime-bugs
Reporter | ||
Updated•6 years ago
|
See Also: → https://webcompat.com/issues/17925
Comment 3•5 years ago
|
||
Migrating Webcompat whiteboard priorities to project flags. See bug 1547409.
Webcompat Priority: --- → ?
Comment 4•5 years ago
|
||
See bug 1547409. Migrating whiteboard priority tags to program flags.
Updated•5 years ago
|
Webcompat Priority: ? → ---
Flags: webcompat?
Assignee | ||
Updated•5 years ago
|
Assignee: nobody → emilio
Assignee | ||
Comment 5•5 years ago
|
||
Also drive-by remove some useless prefixes since user-select was unprefixed in
bug 1492739.
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4172c250e867 Allow the datetime wrapper to grow so that you can e.g. align its contents using text-align. r=dholbert
Comment 7•5 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 5 years ago
status-firefox70:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Updated•5 years ago
|
QA Whiteboard: [qa-70b-p2]
You need to log in
before you can comment on or make changes to this bug.
Description
•