Giter Club home page Giter Club logo

Comments (6)

nt1m avatar nt1m commented on July 17, 2024

I realize tree-scoping VT comes with a bunch of issues, especially with the pseudo-elements being created only on the root element. Even if you scope VT name to a subtree, that VT name will be exposed to the Document through the pseudo-elements which breaks the scoping.

cc @fantasai

from csswg-drafts.

noamr avatar noamr commented on July 17, 2024

I realize tree-scoping VT comes with a bunch of issues, especially with the pseudo-elements being created only on the root element. Even if you scope VT name to a subtree, that VT name will be exposed to the Document through the pseudo-elements which breaks the scoping.

What if styling the pseudo-elements (everything under view-transition-group) were also tree-scoped? The only snag would be dealing with :only-child but perhaps we can find a specific solution to that?

from csswg-drafts.

noamr avatar noamr commented on July 17, 2024

@khushalsagar I'm a bit confused about which part of the spec says that this shouldn't work today. ::part styles are defined in the parent scope, so view-transition-names defined there should apply to the corresponding part inside the shadow DOM.

from csswg-drafts.

noamr avatar noamr commented on July 17, 2024

I checked and also animation-timeline currently doesn't work on parts. I think there is no reason why this shouldn't work, the encapsulation should be for styles not for elements. cc @flackr

from csswg-drafts.

khushalsagar avatar khushalsagar commented on July 17, 2024

@khushalsagar I'm a bit confused about which part of the spec says that this shouldn't work today. ::part styles are defined in the parent scope, so view-transition-names defined there should apply to the corresponding part inside the shadow DOM.

It was added here. Though now that you asked maybe "tree context" is not the right term since it's associated with a selector not a node. So the spec text might need to be fixed. But the intent of the resolution was to exclude names from nodes in inner tree scopes.

from csswg-drafts.

khushalsagar avatar khushalsagar commented on July 17, 2024

Turns out this is not an issue. @andruud clarified that the scoping spec already takes care of ::part by assigning the tree scope to a name based on where the style rule was declared. So using ::part would mean the tree scope of the name is the outer DOM's tree scope.

from csswg-drafts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.