Closed Bug 1404327 Opened 4 years ago Closed 4 years ago

<input type="date"> ignores author-specified font-family style

Categories

(Core :: Layout: Form Controls, defect, P3)

57 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: me, Assigned: jessica)

Details

Attachments

(2 files)

Attached file test.html
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Build ID: 20170925150345

Steps to reproduce:

See attachment or create an empty html document with the following input element:
<input type="date" style="font-family: sans-serif;">


Actual results:

The date element uses the default monospaced font.


Expected results:

The date element should use a sans-serif font, like for example Chrome does.
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core
Flags: needinfo?(jjong)
Priority: -- → P3
I'll take care of this.
Assignee: nobody → jjong
Flags: needinfo?(jjong)
Attached patch patch, v1.Splinter Review
Hi Daniel, does this look reasonable to you?
Attachment #8918222 - Flags: review?(dholbert)
Comment on attachment 8918222 [details] [diff] [review]
patch, v1.

Review of attachment 8918222 [details] [diff] [review]:
-----------------------------------------------------------------

Sure, looks fine.  It looks like Chrome does this as well -- their devtools inspector shows that <input type="date"> has a computed font-family of monospace, from a user agent stylesheet.
Attachment #8918222 - Flags: review?(dholbert) → review+
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: <input type="date"> ignores font-family style → <input type="date"> ignores author-specified font-family style
Pushed by jjong@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc626eeea39a
Move CSS font-family property to date/time input so that it can be overriden. r=dholbert
https://hg.mozilla.org/mozilla-central/rev/dc626eeea39a
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Just to check, this will also apply to <input type="time">?
Based on the patch, yes, it looks like it should apply to both.
You need to log in before you can comment on or make changes to this bug.