Closed Bug 582277 Opened 15 years ago Closed 15 years ago

:-moz-submit-invalid default style

Categories

(Core :: Layout: Form Controls, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla2.0b7

People

(Reporter: mounir, Assigned: mounir)

References

Details

(Keywords: dev-doc-complete)

Attachments

(1 file)

For bug 561636 we want a default :-moz-submit-invalid style. According to limi's mockup it could be: -moz-box-shadow 0 0 2px red; But that may be too close to the default :invalid style and confuse the user. Is that a valid concern? If yes, should we move to something else? (like some transparency + a light red glow?)
My understanding was that it was intentional that the two were the same. I don't think the user will get confused and think that he/she needs to enter something into the button :)
(In reply to comment #1) > My understanding was that it was intentional that the two were the same. I > don't think the user will get confused and think that he/she needs to enter > something into the button :) You should know that a button can be invalid ;) (actually, that should be removed from the specs, there is no reason) limi and dolske, using the same style as the invalid elements sounds good for you?
Err, I'm a bit confused. :moz-submit-invalid was needed because :invalid doesn't apply to <button>s per the spec, right? But yes, the intention was that the button's (default) style should be consistent with the (default) invalid form elements.
(In reply to comment #3) > Err, I'm a bit confused. :moz-submit-invalid was needed because :invalid > doesn't apply to <button>s per the spec, right? No, :-moz-submit-invalid is needed to style a submit button when the form is not valid. It hasn't the same meaning than :invalid which means the element is not valid. Apply :invalid style on the submit button to show that the form is invalid should have been a bad idea. > But yes, the intention was that the button's (default) style should be > consistent with the (default) invalid form elements. Ok.
Depends on: 581222
Attached patch Patch v1Splinter Review
Very small patch to use -moz-box-shadow for submit controls when the form is invalid like we do for invalid elements.
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #473960 - Flags: review?(dbaron)
Attachment #473960 - Flags: approval2.0?
Depends on: 590039
David, it would be nice if you can found 5 minutes on Friday to review this so I can push it for beta6.
Comment on attachment 473960 [details] [diff] [review] Patch v1 r=dbaron
Attachment #473960 - Flags: review?(dbaron) → review+
Pushed: http://hg.mozilla.org/mozilla-central/rev/48a6e53a710f Would be nice to have the doc saying that you can override the default style with: :-moz-submit-invalid { -moz-box-shadow: none; box-shadow: none; }
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite+
Keywords: dev-doc-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b6
Depends on: 595636
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: