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

selectlist: Animating changes in the selected value #824

Open
josepharhar opened this issue Aug 31, 2023 · 5 comments
Open

selectlist: Animating changes in the selected value #824

josepharhar opened this issue Aug 31, 2023 · 5 comments
Labels
select These are issues that relate to the select component

Comments

@josepharhar
Copy link
Collaborator

I was talking to @argyleink about how the <selectedoption> element sets new values in #571 (comment) and he was interested in whether the author could create a transition or a view transition when the <selectedoption> content changes. Maybe this is something we could find a way to support?

@josepharhar josepharhar added the select These are issues that relate to the select component label Aug 31, 2023
@argyleink
Copy link

argyleink commented Aug 31, 2023

UA styles are like:

selectedoption {
  view-transition-name: none;
}

But author styles are like, no way, lemme animate:

.color-picker selectedoption {
  view-transition-name: selected-color-option;
}

::view-transition-new(selected-color-option) {
  animation: var(--slide-in-up);
}

::view-transition-old(selected-color-option) {
  animation: var(--slide-out-up);
}

Copy link

There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.

@github-actions github-actions bot added the stale label Feb 28, 2024
@josepharhar
Copy link
Collaborator Author

I'm not sure exactly what browser support would be needed in order for this to work. @argyleink would you need to have a UA style rule with view-transition-name?

@argyleink
Copy link

hm, might not be that simple because there could be multiple on the page. doesnt seem a good idea for the UA to attempt multiple unique view transition names for selected options. the intent of this issue is good, but the strategy being offered via the UA and VT, isnt.

@github-actions github-actions bot removed the stale label Mar 22, 2024
@yisibl
Copy link

yisibl commented May 29, 2024

@starting-style and transition: display 1s allow-discrete doesn't seem to work here, should we support it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
select These are issues that relate to the select component
Projects
None yet
Development

No branches or pull requests

3 participants