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 Plugin] Scoped styles on body element #3

Open
baryla opened this issue Feb 4, 2020 · 0 comments
Open

[Vue Plugin] Scoped styles on body element #3

baryla opened this issue Feb 4, 2020 · 0 comments
Labels
Plugin Issues related to a plugin question Further information is requested Vue Plugin Issues related to the Vue plugin

Comments

@baryla
Copy link
Collaborator

baryla commented Feb 4, 2020

Problem

If we have the following scenario:

<!-- App.vue -->
<template>
    <h1 class="heading">Hello World!</h1>
</template>
<script>
    export default { name: 'app' };
</script>
<style lang="scss" scoped>
@import "./app.scss";

h1 {
    color: red;
}
</style>
// Imported from App.vue
$color: pink;

body {
    background: $color;
}

The body background in app.scss will not be set because the styles are scoped and for now, the generated scopeId doesn't work on root dom elements such as html, body.

Solution

?

To do

Need to confirm if this is actually valid and expected behaviour.

@baryla baryla added question Further information is requested Transpiler labels Feb 4, 2020
@baryla baryla added Plugin Issues related to a plugin Vue Plugin Issues related to the Vue plugin and removed Transpiler labels Mar 5, 2020
@baryla baryla changed the title [Vue Transpiler] Scoped styles on body element [Vue Plugin] Scoped styles on body element Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Plugin Issues related to a plugin question Further information is requested Vue Plugin Issues related to the Vue plugin
Projects
None yet
Development

No branches or pull requests

1 participant