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

[Vue] Add support for scoped styles (though they will not be able to access theme variables). #18287

Merged
merged 2 commits into from Nov 11, 2021

Conversation

diosmosis
Copy link
Member

Description:

Noticed that my understanding of how Vue implements scoped styles was incorrect. I assumed it worked like Emotion, but for production Vue will generate a CSS file. So we can use scoped styles w/o increasing the JS bundle size.

Note, however, that theme variables defined in the normal Matomo asset pipeline are not available here, so it will be of limited use. For the migration I won't be moving them.

Review

@diosmosis diosmosis added the Needs Review PRs that need a code review label Nov 10, 2021
@diosmosis diosmosis added this to the 4.6.0 milestone Nov 10, 2021
@sgiehl
Copy link
Member

sgiehl commented Nov 10, 2021

@diosmosis Could you maybe add some scoped css to the example vue component? If we support it, would be good to have that there I guess.

@diosmosis
Copy link
Member Author

@sgiehl good idea, added it 👍

Copy link
Contributor

@peterhashair peterhashair left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that was me doing that way the other day.

@diosmosis diosmosis merged commit 32d9de6 into 4.x-dev Nov 11, 2021
@diosmosis diosmosis deleted the scoped-less branch November 11, 2021 02:30
@justinvelluppillai justinvelluppillai added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Review PRs that need a code review not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants