Closed Bug 1317600 Opened 8 years ago Closed 8 years ago

[DateTimePicker] Spinner arrow buttons shouldn't depend on find bar resources

Categories

(Toolkit :: Themes, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: scottwu, Assigned: scottwu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

As pointed by :dao in bug 1301284:

> ::: toolkit/themes/shared/timepicker.css:63

> > +.spinner-container button.up {
> > +  mask: url("chrome://global/skin/icons/find-arrows.svg#glyph-find-previous") no-repeat 50% 50%;
> > +}
> > +
> > +.spinner-container button.down {
> > +  mask: url("chrome://global/skin/icons/find-arrows.svg#glyph-find-next") no-repeat 50% 50%;
> > +}

The svg is for the find bar and shouldn't be used directly here.
Component: XUL Widgets → Themes
Priority: -- → P3
Are you going to work on this? Might also be a good first bug if you provide instructions on how to fix this.
Flags: needinfo?(scwwu)
I've actually got the fix when working on a different bug, but haven't got the chance to put it here. Sorry about the delay!

I created a new svg based on the resources from the visual spec. Wonder if you could take a look? Thanks!
Assignee: nobody → scwwu
Flags: needinfo?(scwwu) → needinfo?(dao+bmo)
Why are you using mask here (rather than list-style-image or background-image), and if there's a good reason for using mask, why are you specifying a fill color? Isn't that color irrelevant when using mask?
Flags: needinfo?(dao+bmo)
Yes you are right that the fill color is irrelevant in this case and I'll take it out.

Initially I tried to use background-image but I couldn't find a way to change the fill (when :hover or active), so I used mask to achieve that. Do you think there's a better approach?
Flags: needinfo?(dao+bmo)
(In reply to Scott Wu [:scottwu] from comment #5)
> Initially I tried to use background-image but I couldn't find a way to
> change the fill (when :hover or active), so I used mask to achieve that. Do
> you think there's a better approach?

We use chrome://global/skin/filters.svg#fill for that.

Here's an example: https://dxr.mozilla.org/mozilla-central/source/browser/themes/shared/downloads/downloads.inc.css#138
Flags: needinfo?(dao+bmo)
Comment on attachment 8816357 [details]
Bug 1317600 - Spinner arrow buttons no longer depend on find bar resources;

Nice!
Attachment #8816357 - Flags: review?(dao+bmo) → review+
Thank you Dão!
Keywords: checkin-needed
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/53cf106dd90c
Make date / time picker spinner arrow buttons no longer depend on find bar resources; r=dao
Keywords: checkin-needed
Pushed by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/37fb958b2f9b
Make date / time picker spinner arrow buttons no longer depend on find bar resources; r=dao
Please ignore the backout which will be posted here in a few minutes, this was done by mistake and the patch landed again, see comment 11. Thank you.
Backout by archaeopteryx@coole-files.de:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ace52a373931
Backed out changeset 53cf106dd90c on suspicion of causing sanitization tests like browser_sanitize-timespans.js to fail on OS X. r=backout
https://hg.mozilla.org/mozilla-central/rev/37fb958b2f9b
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: