-
Notifications
You must be signed in to change notification settings - Fork 59
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
Support for view transition directives #832
Conversation
🦋 Changeset detectedLatest commit: 49eea26 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
internal/printer/printer.go
Outdated
@@ -141,6 +147,10 @@ func (p *printer) printCSSImports(cssLen int) { | |||
p.print(fmt.Sprintf("import \"%s?astro&type=style&index=%v&lang.css\";", p.opts.Filename, i)) | |||
i++ | |||
} | |||
if p.needsTransitionCSS { | |||
p.addNilSourceMapping() | |||
p.print(`import "astro/components/viewtransitions.css";`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't clearly comment this yesterday, I was also wondering if we should create a new option for this import path, similar to how we have the internalURL
option.
Not blocking as this is experimental and we can change again if we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, I can add that, good call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome. Do we also want to prefix with "experimental"? (just in case)
Changes
transition:animate
on an element is turned intodata-astro-transition-scope={renderTransition()}
which is used to create a scope name for the particular element and set up the CSS.Testing
Docs
N/A