Closed Bug 706427 Opened 13 years ago Closed 12 years ago

Computed View search should work with all color types

Categories

(DevTools :: Inspector, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: miker, Assigned: miker)

References

Details

(Whiteboard: [computedview])

Attachments

(1 file)

The style inspector search is a simple string search but it would be far better if it could return color values that match even when the color types do not: e.g. Searching for "red" should also return the following: red #FF0000 #F00 rgb(255, 0, 0) hsl(0, 100%, 50%) hsla(0, 100%, 50%, 1) rgb(255, 0, 0) rgba(255, 0, 0, 1)
Summary: Style Inspector search should work with all color types → Style Inspector search should work with all unit types
Summary: Style Inspector search should work with all unit types → Style Inspector search should work with all color types
note that the attached proof of concept, while neat, doesn't necessarily demonstrate what searching for a color will look like. Maybe enumerating all of the possible values for blue would be more indicative of what's happening.
I'm also more curious about the algorithm behind the search. Do we precalculate possible matches for colors? Generate some kind of key up front? A table of conversions? This could be quite tricky to do well.
Presumably we can just normalize to a particular color representation
I would use a hasColor method that checks against each color type in turn and returns true on a match. As long as the colors are cached as we calculate them we have good performance and low memory useage.
Bug triage, filter on PEGASUS.
Whiteboard: [styleinspector] → [computedview]
Assignee: nobody → mratcliffe
OS: Linux → All
Hardware: x86 → All
Summary: Style Inspector search should work with all color types → Computed View search should work with all color types
We decided against doing this as search results would be confusing e.g. When searching for 100% we don't want red to appear in the list of results.
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: