Closed Bug 1299935 Opened 8 years ago Closed 7 years ago

Define SVG fill from CSS

Categories

(DevTools :: General, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1399886

People

(Reporter: ntim, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

      No description provided.
Attached patch Define SVG fills with CSS (obsolete) — Splinter Review
Attachment #8787395 - Flags: feedback?(bgrinstead)
Attachment #8787428 - Flags: feedback?(bgrinstead)
Attachment #8787395 - Attachment is obsolete: true
Attachment #8787395 - Flags: feedback?(bgrinstead)
Issues I've found:
- icons with hardcoded filters will have the wrong colour
- firebug theme is completely broken

I'll leave the feedback flag for code feedback.
Severity: normal → enhancement
Priority: -- → P3
Comment on attachment 8787428 [details] [diff] [review]
Define SVG fills with CSS

Review of attachment 8787428 [details] [diff] [review]:
-----------------------------------------------------------------

Interesting trick.  What does this buy us over the current filter approach though?

::: devtools/client/themes/common.css
@@ +544,5 @@
> +#requests-menu-perf-notice-button .button-icon,
> +#canvas-debugging-empty-notice-button .button-icon,
> +#toggle-breakpoints[checked] > image,
> +.event-tooltip-debugger-icon {
> +  filter: url("images/filters.svg#fill");

Shouldn't this still use the invert filter as before - and only use the #fill filter for checked icon state where we know the color we want to get to?

@@ +545,5 @@
> +#canvas-debugging-empty-notice-button .button-icon,
> +#toggle-breakpoints[checked] > image,
> +.event-tooltip-debugger-icon {
> +  filter: url("images/filters.svg#fill");
> +  fill: currentColor;

I don't think the fill should be related to the text color of these elements, might be why this isn't working in the firebug theme
Attachment #8787428 - Flags: feedback?(bgrinstead)
Not going to work on this anytime soon
Assignee: ntim.bugs → nobody
Status: ASSIGNED → NEW
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: