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-1] Consider centralizing UA style rules #8891

Closed
fantasai opened this issue May 31, 2023 · 4 comments
Closed

[css-view-transitions-1] Consider centralizing UA style rules #8891

fantasai opened this issue May 31, 2023 · 4 comments
Labels
Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-view-transitions-1 View Transitions; Bugs only editorial

Comments

@fantasai
Copy link
Collaborator

The View Transitions spec has a lot of additions to the UA style sheet split across many sections. It's just a suggestion, but I wonder if it might be easier if these rules were all centralized into one section (after the definitions of all of the pseudo-elements so that we know what we're styling and how they relate).

@svgeesus
Copy link
Contributor

svgeesus commented Jun 1, 2023

I agree.

Related, I wonder if the snapshot should aggregate all the UA additions for the Official Definition specifications, for the same reason.

@svgeesus svgeesus added the css-view-transitions-1 View Transitions; Bugs only label Jun 1, 2023
@fantasai
Copy link
Collaborator Author

fantasai commented Jun 2, 2023

@svgeesus Probably at that point we should make sure they're upstreamed to HTML etc.

@khushalsagar
Copy link
Member

There's 2 types of UA style rules in this spec:

  1. Static styles which are split across User Agent Styles and View Transition Pseudo Elements. I don't have a strong preference between inlining the styles with the defining of each pseudo vs one section for all of them after the pseudos. How about moving the "User Agent styles" section after "Pseudo Elements" and adding all the static styles there?

  2. Dynamic styles which are generated using layout info from each element and are Document scope. The stylesheet is defined here and the exact values are part of the algorithms which generate the styles. These should stay as-is since how the style values are generated is intertwined with these algorithms.

Probably at that point we should make sure they're upstreamed to HTML etc.

I didn't follow this. The styles in this spec apply to all namespaces (not just html). This came up on #8573 with the conclusion that it makes sense for each CSS spec to define styles which apply to all namespaces.

@fantasai
Copy link
Collaborator Author

fantasai commented Jun 5, 2023

@khushalsagar I think I agree that the generated styles need to stay where they are, it seems that consolidating the global sheet (and noting at the end that there is a generated sheet as well) would be a good idea.

Probably at that point we should make sure they're upstreamed to HTML etc.

I was referring to the HTML-specific styles. :) A lot of the UA rules we have in the CSS specs are currently just informative suggestions for HTML. The rules that apply to all namespaces (like those in View Transitions) should of course stay defined in CSS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by Editor Discretion Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-view-transitions-1 View Transitions; Bugs only editorial
Projects
None yet
Development

No branches or pull requests

3 participants