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

[DRAFT] fix: :initial variant style not applied during SSR using v-motion #199

Closed

Conversation

BobbieGoede
Copy link
Collaborator

@BobbieGoede BobbieGoede commented Jun 1, 2024

🔗 Linked issue

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme or JSDoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

I spent some time updating https://github.com/intlify/vue-i18n-extensions and tried to see what I could from it at the same time.

This PR adds a directive transform to extract the style provided in :initial and bind it to the element during SSR, since there isn't really any documentation on writing a directive transform this was mostly trial and error to see what worked, while the code looks sloppy this does seem to work with my initial tests.

The implementation so far is still a work in progress as it doesn't handle the shorthand properties (such as x, y, etc.) that we normally support. Ideally I can add tests as well but setting up tests for SSR will probably be a challenge on its own, perhaps I can test the transform in isolation like https://github.com/intlify/vue-i18n-extensions does instead.

📝 Checklist

  • I have linked an issue or discussion.
  • I have added tests (if possible).
  • I have updated the documentation accordingly.

@BobbieGoede BobbieGoede self-assigned this Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant