Closed Bug 332841 Opened 19 years ago Closed 19 years ago

Setting display: block on a hidden input allows borders on those hidden inputs

Categories

(Firefox :: General, defect)

PowerPC
macOS
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: junk, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(1 file, 1 obsolete file)

User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051229 Camino/1.0b2 Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051229 Camino/1.0b2 Display block (when applied to hidden input elements) is allowing styling of those elements, such as borders. Reproducible: Always Steps to Reproduce: 1. Create a form with hidden inputs (a bunch makes them more visible) 2. Add a CSS containing: input {display: block; border: thin solid red;} 3. Make sure the border color in #2 is not the same as you background color Actual Results: Load the file, and you should see collapsed borders around your hidden inputs (in the example they would be the color red. Expected Results: No borders around hidden inputs, the display mode on a hidden input type should not matter. This occurs in Camino 1.0b2 and Firefox 1.5.0.1
Attached file Example of the bug in action (obsolete) —
View this to see what this is about.
Attachment #217291 - Attachment is obsolete: true
Summary: Setting display: block on a hidden input allows borders on thos hidden inputs → Setting display: block on a hidden input allows borders on those hidden inputs
Keywords: testcase
Hidden inputs are set to display:none in forms.css Web designers can override that with display:block. That's not really a bug, it is done this way on purpose.
Yep. This is by design.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
*** Bug 334865 has been marked as a duplicate of this bug. ***
*** Bug 356054 has been marked as a duplicate of this bug. ***
*** Bug 360346 has been marked as a duplicate of this bug. ***
Explain how it's not a bug. According to the w3c HTML 4.01 standard for hidden inputs, they "are not rendered" and so it IS A BUG! http://www.w3.org/TR/html401/interact/forms.html#hidden-control
To follow the standard a fix would be to put display: none !important; in forms.css for hidden inputs.
"display: block !important;" in the website's CSS would still overwrite that, though, right?
No, display: none !important; in forms.css would override every other css, so that would work as a solution. Opera 9.20 and IE7 don't allow styling of an <input type="hidden"> element (it always stays hidden). I guess I've changed my mind on this one. It seems to me better to be compatible with IE7 then allowing the hidden input to be styled (although I think that's more logical).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: