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-view-transitions-2] CSSViewTransitionRule.type overrides deprecated CSSRule.type #9905

Closed
cdoublev opened this issue Feb 3, 2024 · 4 comments · Fixed by #10012
Closed
Labels
css-view-transitions-2 View Transitions; New feature requests

Comments

@cdoublev
Copy link
Collaborator

cdoublev commented Feb 3, 2024

One may expect 0 from getting CSSViewTransitionRule.type.

The type attribute is deprecated. It must return an integer, as follows:

[...]

Otherwise, return 0.

I guess it is ok if it returns the descriptor value, but I would just like to make sure.

@cdoublev cdoublev added the css-view-transitions-2 View Transitions; New feature requests label Feb 3, 2024
@tabatkins
Copy link
Member

No, this does need fixing. The naming clash is unfortunate, but subclasses shouldn't override an attribute with an incompatible type.

@noamr
Copy link
Collaborator

noamr commented Feb 14, 2024

OK, proposing typeList (like classList) as this is a DOMTokenList.

@noamr noamr added the Agenda+ label Feb 22, 2024
@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-view-transitions-2] `CSSViewTransitionRule.type` overrides deprecated `CSSRule.type` , and agreed to the following:

  • RESOLVED: Change CSSViewTransitionRule .type to .typeList
The full IRC log of that discussion <Frances> Tab: CSSViewTransitionRule as a .type is deprecated, it needs renaming such as typeList instead.
<bramus> SGTM
<TabAtkins> .type is already used in CSSRule (it's deprecated)
<Frances> PROPOSAL: Change CSSViewTransitionRule .type to .typeList
<Frances> RESOLVED: Change CSSViewTransitionRule .type to .typeList

@cdoublev
Copy link
Collaborator Author

Probably too late but it would have been nice to match the descriptor, the CSS rule attribute, and the argument property for startViewTransition(), eg. with active-type/activeType.

It allows blindly defining descriptors from the specified declarations with the appropriate algorithm, as is usually (always?) the case with other CSS rules mirroring specified declarations and exposed attributes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-view-transitions-2 View Transitions; New feature requests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants