You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@necolas I saw that! From what I understand that handles the view-transition-name part of the equation, but adding custom styles for view transitions is not part of that API. This is to make that part simpler.
View Transitions (Level 1) standard did not have support for view-transition-class which made writing styles for it tedious and repetitive. Thankfully both Safari and Chrome have already shipped View Transitions (Level 2) which includes support for view-transition-class that lets us share the same styles for many different elements and it starts to make sense as an API for StyleX.
This API does discourage the use of styles that target a specific view-transition-name which is required to be unique in the DOM. I think this is OK, because it's similar to an ID selector in the view-transition domain.
CSS now has a
@position-try
at rule which is used as values. This is similar tostylex.keyframes
and needs a similar API.Similarly, there is now
view-transition-class
which need global rules similar to:This should probably be supported with an API that looks like this:
(Open to changing this API based on feedback.)
Discussed in #860
Originally posted by jonnitto January 15, 2025
I want to add some at rules like this in the CSS file:
How can I achieve this? I didn't found anything in the documentation, neither here or in the issues…
The text was updated successfully, but these errors were encountered: