Open Bug 1183743 Opened 9 years ago Updated 2 years ago

[Rule View] Add a highlight color for the rule selector's pseudoclass and attribute in the rule editor

Categories

(DevTools :: Inspector: Rules, enhancement, P3)

enhancement

Tracking

(Not tracked)

People

(Reporter: gl, Unassigned)

References

Details

Attachments

(2 files)

In Bug 1178535, we added parsing of the css selector to 4 types: element, pseudoclass locks, attributes and other pseudoclasses. We also added a highlight color for pseudoclass locks to make it easier to see the new rules added in the rule view when we toggle a pseudoclass lock. This bug is to figure out the best UX and color for attributes and the other pseudoclasses.
Assignee: nobody → gabriel.luong
Status: NEW → ASSIGNED
Flags: needinfo?(shorlander)
Flags: needinfo?(shorlander) → needinfo?(hholmes)
I think I need some clarification on what's needed for this bug.

data-*: Do we just need a color for data attributes, or are we trying to think through how we might choose colors when someone has a bunch of different data attributes? (http://html5doctor.com/html5-custom-data-attributes/)

pseudoclass locks: there is a bug with some UX work for pseudoclass locks that seems like it never got reviewed here: Bug 1205371
Flags: needinfo?(hholmes) → needinfo?(gl)
See Also: → 1205371
Whoops, hit submit before I was done.

Gabriel, what do you mean by "other pseudoclasses"? Are there more than just before/after?
Attached image Screenshot
Flags: needinfo?(gl)
So, this is specific to the display of the selectors in the rules view. Currently, we add a red highlight colour for pseudoclasses listed in the pseudo class panel (:hover, :active, :focus). See https://bugzilla.mozilla.org/attachment.cgi?id=8705835 for screenshot. 

We added the ability to parse selectors for the pseudoclasses and attributes. So, this bug is to pick colour(s) for other pseudoclasses that are not listed in that panel (https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes) and css selector attributes, eg. a[target="home.html"].
Flags: needinfo?(hholmes)
The way I see it, we can go one of two ways:

- Continue using red for all pseudo classes, since they're all technically in the same category. (I suspect that you Gabriel aren't really a fan of that, which is fine—it's true that I think most people mentally have the pseudolocks in a category all on their own).
- Use complimentary colors to that orange-red. I'd suggest maybe #B52943 and #C92627? Those two colors seem to look nice together with the current orange-red of the current pseudo-lock color. (See attachment.)

I don't really have anything to say about the UX of it, since it really isn't a UX question.
Inspector bug triage. Filter on CLIMBING SHOES.
Severity: normal → enhancement
Priority: -- → P3
Assignee: gl → nobody
Status: ASSIGNED → NEW
Component: Developer Tools: Inspector → Developer Tools: CSS Rules Inspector
Product: Firefox → DevTools
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: