Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-pseudo-4] Add CSSPseudoElement.parentElement #2816

Closed
birtles opened this issue Jun 25, 2018 · 7 comments
Closed

[css-pseudo-4] Add CSSPseudoElement.parentElement #2816

birtles opened this issue Jun 25, 2018 · 7 comments
Assignees
Labels
css-pseudo-4 Current Work

Comments

@birtles
Copy link
Contributor

birtles commented Jun 25, 2018

A CSSPseudoElement would be much more useful if it were possible to cross-reference it to the DOM tree. I believe this was part of the PseudoElement specified in CSSOM before that disappeared.

(In Gecko we currently implement CSSPseudoElement with only two attributes: type and parentElement since that seems to be all we need for now.)

@birtles birtles added the css-pseudo-4 Current Work label Jun 25, 2018
@Loirooriol
Copy link
Contributor

Is this "parent element" the originating element, or is this a different concept?

@AmeliaBR
Copy link
Contributor

I agree with @Loirooriol that "parent element" is a potentially confusing name for "originating element", because of newer pseudo-elements like ::part (or the various well-established, prefixed selectors for styling browser widgets) which might match an element inside a shadow tree, where that element has parent elements in the shadow structure.

@birtles
Copy link
Contributor Author

birtles commented Jul 1, 2018

Yes, I think originating element is the corresponding spec term. I'm not sure what the IDL member should be called.

@fantasai
Copy link
Collaborator

fantasai commented Jul 2, 2018

Maybe just .element?

@tabatkins
Copy link
Member

Hmm yeah, .parentElement is compelling but wrong; .originatingElement is correct but soft-exceeds my complexity budget for spelling. .element sounds good.

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed Add CSSPseudoElement.parentElement, and agreed to the following:

  • RESOLVED: Add a .element prop that brings psuedos back to their element
The full IRC log of that discussion <dael> Topic: Add CSSPseudoElement.parentElement
<dael> github: https://github.com//issues/2816
<dael> fantasai: This one was filed by birtles and I don't know too much about the APIs. They have a big red notice saying this was just an idea. It seems Mozilla is shipping some form of this API.
<dael> fantasai: We should probably put something there
<dael> Rossen_: Currently suggested API, parent element was suggested and then pointed out that was not nec. the best name at the very least. It's the originalting element and fantasai suggested .element
<dael> Rossen_: If this is about naming, we can discuss if we want to add the API. I think adding is warranted
<dael> TabAtkins: Agree having the attribute to get back to the real element is a necessary part. I like .element suggestion for the name
<dael> Rossen_: Additional comments?
<florian> sounds good
<dael> Rossen_: Objections to adding a .element prop that brings psuedos back to their element?
<dael> RESOLVED: Add a .element prop that brings psuedos back to their element

@emilio
Copy link
Collaborator

emilio commented Jan 16, 2019

Gecko is not shipping this on any release channel other than Nightly: https://searchfox.org/mozilla-central/rev/bee8cf15c901b9f4b0c074c9977da4bbebc506e3/modules/libpref/init/StaticPrefList.h#137

@birtles birtles self-assigned this Jan 21, 2019
birtles added a commit to birtles/csswg-drafts that referenced this issue Jan 21, 2019
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Feb 22, 2019
…nt.element; r=bzbarsky

As per CSSWG resolution:

  w3c/csswg-drafts#2816 (comment)

And corresponding spec change:

  w3c/csswg-drafts@2dbf1e4

Differential Revision: https://phabricator.services.mozilla.com/D20427

--HG--
extra : moz-landing-system : lando
mykmelez pushed a commit to mykmelez/gecko that referenced this issue Feb 22, 2019
moz-wptsync-bot pushed a commit to web-platform-tests/wpt that referenced this issue Feb 25, 2019
As per CSSWG resolution:

  w3c/csswg-drafts#2816 (comment)

And corresponding spec change:

  w3c/csswg-drafts@2dbf1e4

Differential Revision: https://phabricator.services.mozilla.com/D20427

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1528883
gecko-commit: f35e52301a453825fbe63b074b7702968786d8fe
gecko-integration-branch: central
gecko-reviewers: bzbarsky
jgraham pushed a commit to web-platform-tests/wpt that referenced this issue Feb 28, 2019
As per CSSWG resolution:

  w3c/csswg-drafts#2816 (comment)

And corresponding spec change:

  w3c/csswg-drafts@2dbf1e4

Differential Revision: https://phabricator.services.mozilla.com/D20427

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1528883
gecko-commit: f35e52301a453825fbe63b074b7702968786d8fe
gecko-integration-branch: central
gecko-reviewers: bzbarsky
marcoscaceres pushed a commit to web-platform-tests/wpt that referenced this issue Jul 23, 2019
As per CSSWG resolution:

  w3c/csswg-drafts#2816 (comment)

And corresponding spec change:

  w3c/csswg-drafts@2dbf1e4

Differential Revision: https://phabricator.services.mozilla.com/D20427

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1528883
gecko-commit: f35e52301a453825fbe63b074b7702968786d8fe
gecko-integration-branch: central
gecko-reviewers: bzbarsky
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 3, 2019
…nt.element; r=bzbarsky

As per CSSWG resolution:

  w3c/csswg-drafts#2816 (comment)

And corresponding spec change:

  w3c/csswg-drafts@2dbf1e4

Differential Revision: https://phabricator.services.mozilla.com/D20427

UltraBlame original commit: f35e52301a453825fbe63b074b7702968786d8fe
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…nt.element; r=bzbarsky

As per CSSWG resolution:

  w3c/csswg-drafts#2816 (comment)

And corresponding spec change:

  w3c/csswg-drafts@2dbf1e4

Differential Revision: https://phabricator.services.mozilla.com/D20427

UltraBlame original commit: f35e52301a453825fbe63b074b7702968786d8fe
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…nt.element; r=bzbarsky

As per CSSWG resolution:

  w3c/csswg-drafts#2816 (comment)

And corresponding spec change:

  w3c/csswg-drafts@2dbf1e4

Differential Revision: https://phabricator.services.mozilla.com/D20427

UltraBlame original commit: f35e52301a453825fbe63b074b7702968786d8fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-pseudo-4 Current Work
Projects
None yet
Development

No branches or pull requests

7 participants