Bug 9348 - Not all styles available to other input elements apply to type="file" and type="password"
Summary: Not all styles available to other input elements apply to type="file" and typ...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 6990
Blocks:
  Show dependency treegraph
 
Reported: 2006-06-07 15:22 PDT by John Lascurettes
Modified: 2022-07-06 14:06 PDT (History)
4 users (show)

See Also:


Attachments
Attachment to test behavior. Shows these input elements with styles applied: text, password, button, submit, reset, file. (2.22 KB, text/html)
2006-06-07 15:30 PDT, John Lascurettes
no flags Details
More fully fleshed out test page (with comparisons of other browser behavior) (38.08 KB, text/html)
2006-06-28 14:57 PDT, John Lascurettes
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description John Lascurettes 2006-06-07 15:22:37 PDT
When trying to apply styles to input elements, the latest nightly build will apply them to inputs of type "text", "button", "submit" and "reset". However, border is not applied to "password" or "file" types. Type of "file" not accepting much in the way of styles is consistent with most other browsers. However, in other browsers that allow styling on input elements of type="text", they will apply the same styles to type="password". This inconsistency in WebKit can create interface problems with pages such as log-in screens.
Comment 1 John Lascurettes 2006-06-07 15:30:12 PDT
Created attachment 8759 [details]
Attachment to test behavior. Shows these input elements with styles applied: text, password, button, submit, reset, file.
Comment 2 Alexey Proskuryakov 2006-06-07 21:22:23 PDT
The problem with password fields is tracked in bug 6990. Looks like file inputs are completely styled in Firefox, so I'm keeping this bug open to track the problem with these.
Comment 3 Dimitri Bouniol 2006-06-27 22:23:54 PDT
For the file input, if Webkit decides to add styling to it (which is poorly supported in other browsers), how will the text part appear since there in no textfield for Webkit? Will it show a background?
Comment 4 Dave Hyatt 2006-06-28 11:50:21 PDT
It will not have a background by default (which is the way it works now I believe).  We'll probably support styling of the button via a pseudo-element.  Because our file upload control never lets a user enter a file without bringing up a file dialog, we can safely allow the control to be styled.
Comment 5 John Lascurettes 2006-06-28 14:57:46 PDT
Created attachment 9082 [details]
More fully fleshed out test page (with comparisons of other browser behavior)

This test page shows more completely the behavior of CSS on each form element. Comparisons of other major browsers are included.
Comment 6 Dimitri Bouniol 2006-06-28 15:20:40 PDT
You should add "-khtml-appearance: none;" to get checkboxes and radio buttons styled.
Comment 7 Adam Roben (:aroben) 2006-09-12 16:12:09 PDT
<input type="file"> is now implemented in the engine instead of as a widget, and therefore should support most styling. You can style the button explicitly using the pseudo-element ::-webkit-file-upload-button. There does seem to be a bug where the border doesn't appear unless you set border-style explicitly, and bug 10824 says that the "no file selected" text doesn't always appear. But we're getting closer!
Comment 8 Brent Fulgham 2022-07-06 14:06:24 PDT
I don't see differences between Chrome, Safari, and Firefox on this page -- except that Firefox did not center the "Search by State" options (while Chrome and Safari did).

If there are still relevant issues here that are not covered by WPT, please REOPEN this bug with details.