:-moz-submit-invalid default style

RESOLVED FIXED in mozilla2.0b7

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

({dev-doc-complete})

Trunk
mozilla2.0b7
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Assignee

Description

9 years ago
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 :)
Assignee

Comment 2

9 years ago
(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.
Assignee

Comment 4

9 years ago
(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.
Assignee

Updated

9 years ago
Depends on: 581222
Assignee

Comment 5

9 years ago
Posted 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?
Assignee

Updated

9 years ago
Depends on: 590039
Assignee

Comment 6

9 years ago
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+
Attachment #473960 - Flags: approval2.0? → approval2.0+
Assignee

Comment 8

9 years ago
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: 9 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.