| Summary: | CSS tooling shows mis-matched colors based on where you hover... | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Eric Moffatt <emoffatt> | ||||||
| Component: | JS Tools | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | curtis.windatt.public, Michael_Rennie, Olivier_Thomann | ||||||
| Version: | 12.0 | ||||||||
| Target Milestone: | 13.0 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
I'll take a look. When hovering on the background:, you end up getting the default background color. When hovering on #fefefe, you end up getting that color. I am not sure this is expected. If we expect both colors to be identical, we need to be able to retrieve the next token when hovering on 'background:'. csslinkt.Colors contains the 'background' entry so we try to show that color. It is part of deprecated entries. See https://www.w3.org/TR/css3-color/#css2-system. So we could check if the "value" is a color format. Curtis, I'll need your input on this to make sure what the expected behavior is. I think the intention was not to display the color when hovering on the "background:" entry. This was a side-effect on having "background" in the list of deprecated colors from the csslint.Colors collection.
This can be fixed, but then the user won't get a hover when hovering on the color with this entry:
.... {
background: background;
}
I hope this is fine. The only way to really fix this would be to get an ast for css where we can distinguish both backgrounds (one being the attribute name/key and one being the attribute value).
We only want a hover for the value not the key. Right now the only thing we have is a token which is an identifier token.
Maybe checking the next token can be enough.
Created attachment 263729 [details]
Proposed patch
I cannot deliver it right now as git is not working on orion.eclipse.org. |
Created attachment 263601 [details] shows different colors If you hover over the attribute name (i.e. background) but hover over the color you get a different hover color...