GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Define "part-like pseudo-element", from #10083. by tabatkins · Pull Request #10199 · w3c/csswg-drafts

Conversation

@tabatkins

@tabatkins tabatkins commented Apr 11, 2024

Copy link
Copy Markdown
Member

@fantasai review?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tabatkins
[css-pseudo] Define part-like pseudo-element. #10083
2a16dbc
fantasai
fantasai requested changes Apr 12, 2024
View reviewed changes
Comment thread css-pseudo-4/Overview.bs Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread css-pseudo-4/Overview.bs
Part-Like Pseudo-Elements</h3>

A subset of [=tree-abiding pseudo-elements=],
the <dfn>part-like pseudo-elements</dfn>,

@fantasai fantasai Apr 12, 2024

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I like this name. Can we pick something that isn't a reference to ::part()?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tabatkins tabatkins Apr 12, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, would love a different name, but having a problem coming up with one. Problem is coming up with something that's not just a synonym of "abiding". We could try to skirt a little farther in the "Tree-X" namespace - tree-located? tree-positioned? tree-structural?- to indicate that not only do they abide by the tree structure generally (insofar as having a parent/child relationship) but actually have a definite position in that tree (and thus know their sibling relationships too).

Or we could go further afield. Semi-real? Pseudo-real?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tabatkins tabatkins Apr 12, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Tree-structural" is actually really grabbing me, given its parallel with the tree-structural pseudo-classes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@fantasai fantasai Apr 14, 2024

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well ::marker has a definite position in the tree, but you're not including it in this set of things afaict. So it's not about it's tree position, it's about the fact that generates a box that behaves exactly like any other element's generated box.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tabatkins tabatkins Apr 15, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was under the impression that the reason ::marker didn't act like ::before/etc is because we specifically hadn't nailed down its exact tree position. If it does have an exact position, then what is the reasoning behind limiting it? (Besides applying a few one-offs, like disallowing it from being display: list-item or something; that's fine for this new category of pseudos to do.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread css-pseudo-4/Overview.bs Resolved

Uh oh!

There was an error while loading. Please reload this page.

@tabatkins
[css-pseudo] Merge definitions into one section, and add example.
d0f0f42
fantasai
fantasai reviewed Apr 14, 2024
View reviewed changes
Comment thread css-pseudo-4/Overview.bs
Comment on lines +1157 to +1171
<div class=example>
For example, a [=part-like pseudo-element=]
can be used in the <{html-global/exportparts}> attribute,
to masquerade as a ''::part()''
for the component it's in:

<xmp class=html>
<template id=custom-element-template>
<p exportparts="::before : preceding-text">
You can style my ::before pseudo-element
by using ::part(preceding-text), too!
</template>
</xmp>
</div>

@fantasai fantasai Apr 14, 2024

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't helping to illustrate pseudo-elements that "interact with some other platform features as if they were real elements". It's illustrating a real element acting like a pseudo-element (by being selected by one), which is kindof the opposite!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@tabatkins tabatkins Apr 15, 2024

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're misunderstanding the example, because it illustrates the exact opposite. ::part(preceding-text) is selecting a pseudo-element (the p::before pseudo).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@tabatkins

tabatkins commented May 30, 2024

Copy link
Copy Markdown
Member Author

Merging for now, we can figure out what the better term is later.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tabatkins
tabatkins merged commit 0f41712 into main May 30, 2024
@tabatkins
tabatkins deleted the part-like branch May 30, 2024 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fantasai fantasai fantasai requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@tabatkins @fantasai
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.