Closed Bug 482692 Opened 16 years ago Closed 15 years ago

Should be able to override -moz-border-colors with border-color

Categories

(Core :: CSS Parsing and Computation, defect, P4)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.3a2

People

(Reporter: dao, Assigned: dbaron)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

Take http://mxr.mozilla.org/mozilla-central/source/toolkit/themes/pinstripe/global/textbox.css for example. It uses -moz-border-*-colors, and whenever you use -moz-appearance:none to manually style a particular textbox, you have to use -moz-border-*-colors even if you only want a single color on each side. That's annoying.
Making border-left-color, etc., into shorthands would be a good bit of a pain. I'm not sure if it's worth it. I'd note that you can use -moz-border-*-colors: none to turn off that behavior and use border-*-color again.
(In reply to comment #1) > I'd note that you can use -moz-border-*-colors: none to turn off that behavior > and use border-*-color again. But I can't do: -moz-border-colors: none; border: 1px solid red; since there's no -moz-border-colors shorthand, right? So this is hardly better: -moz-border-top-colors: none; -moz-border-right-colors: none; -moz-border-bottom-colors: none; -moz-border-left-colors: none; border: 1px solid red; than: border: 1px solid; -moz-border-top-colors: red; -moz-border-right-colors: red; -moz-border-bottom-colors: red; -moz-border-left-colors: red; Even if there was a -moz-border-colors shorthand, I'm not sure that "none" is helpful, because this: -moz-border-colors: none; border: 1px solid red; doesn't seem like a great improvement over this: border: 1px solid; -moz-border-colors: red; when I really want this to just work: border: 1px solid red;
So one thing that would be quite easy is to make the 'border' shorthand imply -moz-border-*-colors: none, and likewise make border-X imply -moz-border-X-colors: none. It seems like that would help your problem a good bit; not sure how much it would break.
Yeah, that would help, but... > make border-X imply -moz-border-X-colors: none what about -moz-border-start/end?
To do that I'd have to implement -moz-border-start-colors and -moz-border-end-colors, I think.
(In reply to comment #3) > and likewise make border-X imply -moz-border-X-colors: none Actually, this part is harder than I thought, thanks to the fun of the parser and the differences between left/right and top/bottom (thanks to start/end).
Attached patch patch (obsolete) (deleted) — Splinter Review
Here's a patch for making just the 'border' shorthand reset -moz-border-*-colors and (per last week's CSS WG decision) 'border-image'.
Blocks: 545842
(In reply to comment #7) > Created an attachment (id=366883) [details] > patch > > Here's a patch for making just the 'border' shorthand reset > -moz-border-*-colors and (per last week's CSS WG decision) 'border-image'. Can we get this reviewed and landed?
Attachment #366883 - Flags: review?(bzbarsky)
I'd sort of like to know whether dbaron thinks the patch is ready to go before reviewing.
Yeah, the patch is fine, but it could use a test.
Attached patch patch (deleted) — Splinter Review
with test
Assignee: nobody → dbaron
Attachment #366883 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #427596 - Flags: review?(bzbarsky)
Attachment #366883 - Flags: review?(bzbarsky)
Comment on attachment 427596 [details] [diff] [review] patch r=bzbarsky
Attachment #427596 - Flags: review?(bzbarsky) → review+
Blocks: 547418
No longer blocks: 545842
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Priority: -- → P4
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a2
Does or should this affect serialization at all?
(In reply to comment #7) > and (per last week's CSS WG decision) 'border-image'. Is there a link to that particular CSS WG discussion/decision available, for reference?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: