Allow to edit pseudo element rules selector
Categories
(DevTools :: Inspector, task, P3)
Tracking
(firefox147 fixed)
| Tracking | Status | |
|---|---|---|
| firefox147 | --- | fixed |
People
(Reporter: nchevobbe, Assigned: nchevobbe)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 1 obsolete file)
get isSelectorEditable() {
const trait =
this.isEditable &&
this.rule.domRule.type !== ELEMENT_STYLE &&
this.rule.domRule.type !== CSSRule.KEYFRAME_RULE;
// Do not allow editing anonymousselectors until we can
// detect mutations on pseudo elements in Bug 1034110.
return trait && !this.rule.elementStyle.element.isAnonymous;
},
We prevent editing selectors for pseudo elements.
Bug 1034110 is resolved, and it doesn't seem like we need anything else to allow editing those selectors
Updated•29 days ago
|
| Assignee | ||
Comment 1•29 days ago
|
||
| Assignee | ||
Comment 2•28 days ago
|
||
Updated•28 days ago
|
Comment 3•22 days ago
|
||
Comment on attachment 9526422 [details]
Bug 1998704 - [devtools] Turn modifySelector into an async function. r=#devtools.
Revision D272415 was moved to bug 2000876. Setting attachment 9526422 [details] to obsolete.
Updated•20 days ago
|
Comment 5•17 days ago
|
||
| bugherder | ||
Comment 6•16 days ago
|
||
This feature should be mentioned in the Firefox 147 dev release notes.
Sebastian
Updated•2 days ago
|
Comment 7•2 days ago
•
|
||
Hi there,
I'm working on adding this to the MDN Fx147 rel notes. I wrote a test case here: https://codepen.io/Chris-Mills/full/pvyqmzV.
In it, I've got a p::first-line { ... } rule. In Firefox 147, I can edit that to p::first-letter { ... }, li::first-line { ... }, etc., and it works fine.
However, I am also able to do that in Firefox 145.
Has the change been backported, or am I misunderstanding the nature of what has been changed?
| Assignee | ||
Comment 8•2 days ago
|
||
(In reply to Chris Mills [:cmills] from comment #7)
Hi there,
I'm working on adding this to the MDN Fx147 rel notes. I wrote a test case here: https://codepen.io/Chris-Mills/full/pvyqmzV.
In it, I've got a
p::first-line { ... }rule. In Firefox 147, I can edit that top::first-letter { ... },li::first-line { ... }, etc., and it works fine.However, I am also able to do that in Firefox 145.
Has the change been backported, or am I misunderstanding the nature of what has been changed?
Hello Chris, what was changed is the ability to edit selectors when the pseudo element "node" is selected in the markup view (this is different than editing selectors displayed under the "Pseudo elements" section).
- So with this page https://codepen.io/nchevobbe/full/qEZLGob
- Open the inspector
- Select the
::beforenode under the<h1>node in the markup view
-> in 145, the h1.custom::before rule selector can't be edited
-> in 146, the h1.custom::before rule selector can be edited (e.g. we can remove the .custom part of the selector, or transform it into a ::after pseudo element)
Hope this makes sense
Comment 9•2 days ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #8)
Hope this makes sense
Perfect, that does make sense — thanks, Nicolas!
Setting this to dev-doc-complete, as I've added a rel note in https://github.com/mdn/content/pull/42316.
Description
•