Skip to content

[css-pseudo][css-lists] Does ::file-selector-button accept counter properties? #7846

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

Open
Loirooriol opened this issue Oct 6, 2022 · 0 comments
Labels
css-lists-3 Current Work css-pseudo-4 Current Work

Comments

@Loirooriol
Copy link
Contributor

Testcase

<style>
:root { counter-reset: c 0; }
:root::before { content: "[:root::before=" counter(c) "]"; }
:root::after { content: "[:root::after=" counter(c) "]"; }
input::before { content: "[input::before=" counter(c) "]"; }
input::after { content: "[input::after=" counter(c) "]"; }
input::file-selector-button { counter-increment: c 1; }
</style>
<input type="file">

Gecko:

  • Counter is 0 on :root::before
  • input::before and input::after do not generate boxes
  • Counter is 1 on :root::after

Blink and WebKit:

  • Counter is 0 on :root::before, input::before, input::after and :root::after

So, should ::file-selector-button obey counter-increment as Gecko does?
If so, this would presumably happen between input::before and input::after?

https://drafts.csswg.org/css-lists-3/#auto-numbering defines counter properties as applying to

all elements (includes ::before and ::after pseudo-elements)

This doesn't mention ::file-selector-button, but https://drafts.csswg.org/css-pseudo-4/#file-selector-button-pseudo says

There is no restriction on which properties apply to the ::file-selector-button pseudo-element.

@Loirooriol Loirooriol added css-lists-3 Current Work css-pseudo-4 Current Work labels Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-lists-3 Current Work css-pseudo-4 Current Work
Projects
None yet
Development

No branches or pull requests

1 participant