[DRAFT] fix: :initial
variant style not applied during SSR using v-motion
#199
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
❓ Type of 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. 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.x
,y
, etc.) that we normally support📝 Checklist