Closed Bug 1112302 Opened 10 years ago Closed 10 years ago

DevTools: the string 'background' is replaced by '#F1F2F0' in devtools CSS files

Categories

(DevTools :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1049436

People

(Reporter: me, Unassigned)

References

()

Details

Attachments

(1 file)

When working on the new devtools network table header (see Bug 951714 Comment 89), I noticed that the string 'background' is replaced by '#F1F2F0' when it appears on a CSS value.

So, for example:

> .box {
>   background-color: background;
> }

Produces:

> .box {
>   background-color: #F1F2F0;
> }

I'm not sure if that is a feature or a bug. But it makes impossible to write variable names that contain the word 'background'.

For example:

> .requests-menu-header-button[sorted] {
>   background-color: var(--theme-selection-background);
>   color: var(--theme-selection-color);
> }

Results in (screenshot attached):

> .requests-menu-header-button[sorted] {
>   background-color: var(--theme-selection-#F1F2F0);
>   color: var(--theme-selection-color);
> }

Which makes the rule invalid.

Expected results: the string 'background' should not be replaced.
I believe this is the same problem as Bug 1049436 - although I'm not sure why the string "Background" is being replaced.  Mike, do you think this is a dup?
Flags: needinfo?(mratcliffe)
No longer blocks: 951714
(In reply to Brian Grinstead [:bgrins] from comment #1)
> I believe this is the same problem as Bug 1049436 - although I'm not sure
> why the string "Background" is being replaced.  Mike, do you think this is a
> dup?

Yes, background is a system color so we show a color swatch.

Of course, we shouldn't show color swatches about CSS variables, which is what bug 1049436 is about so this is a dupe.
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: needinfo?(mratcliffe)
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: