Bug 1699811 Comment 12 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I just ran into this as well, with the `grid-column` property.  Here's a testcase to demonstrate.

STR with this testcase:
1. In DevTools inspector, select the first grid (`<div class="grid parent-of-pseudo"></div>`), and look at the rules view.

2. Now expand the second grid and select its child `<div class="parent-of-pseudo">` and look at the rules view.

ACTUAL RESULTS:
In step 1, the Rules View shows a warning for the `grid-column` declaration.
In step 2, the Rules View shows no warning for the `grid-column` declaration.
This is the opposite of what should happen.

EXPECTED RESULTS:
In step 1, the Rules View *should not* show a warning for the `grid-column` declaration.
In step 2, the Rules View *should* show a warning for the `grid-column` declaration.

In both cases, if you use the inspector to focus the `::before` element itself, then we do provide the correct result.  There is only an issue when you're focusing the parent (the element that matches the `::before` CSS selector).
I just ran into this as well, with the `grid-column` property.  Here's a testcase to demonstrate.

STR with this testcase:
1. In DevTools inspector, select the first grid (`<div class="grid parent-of-pseudo"></div>`), and look at the rules view.

2. Now expand the second grid and select its child `<div class="parent-of-pseudo">` and look at the rules view.

ACTUAL RESULTS:
In step 1, the Rules View shows a warning for the `grid-column` declaration.
In step 2, the Rules View shows no warning for the `grid-column` declaration.
This is the opposite of what should happen.

EXPECTED RESULTS:
In step 1, the Rules View *should not* show a warning for the `grid-column` declaration.
In step 2, the Rules View *should* show a warning for the `grid-column` declaration.

In both cases, if you use the inspector to focus the (innermost) `::before` pseudo-element itself, then we do provide the correct result.  There is only an issue when you're focusing the parent (the element that matches the `::before` CSS selector).
I just ran into this as well, with the `grid-column` property.  Here's a testcase to demonstrate.

STR with this testcase:
1. In DevTools inspector, select the first grid (`<div class="grid parent-of-pseudo"></div>`), and look at the rules view.

2. Now expand the second grid and select its child `<div class="parent-of-pseudo">` and look at the rules view.

ACTUAL RESULTS:
In step 1, the Rules View shows a warning for the `grid-column` declaration.
In step 2, the Rules View shows no warning for the `grid-column` declaration.
This is the opposite of what should happen.

EXPECTED RESULTS:
In step 1, the Rules View *should not* show a warning for the `grid-column` declaration.
In step 2, the Rules View *should* show a warning for the `grid-column` declaration.

In both cases, if you use the inspector to focus the (innermost) `::before` pseudo-element itself, then we do provide the correct result (we correctly show or don't-show a warning in the rules panel).  There is only an issue when you're focusing the parent (the element that matches the `::before` CSS selector); we warn depending on whether the declaration is applicable **to the parent**, which doesn't make sense in this case.

Back to Bug 1699811 Comment 12