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

CSS Selector Tags Reversed #3

Open
wspeirs opened this issue Aug 8, 2019 · 3 comments
Open

CSS Selector Tags Reversed #3

wspeirs opened this issue Aug 8, 2019 · 3 comments
Labels
bug Something isn't working

Comments

@wspeirs
Copy link

wspeirs commented Aug 8, 2019

It appears the CSS attribute selector tags are reversed during rendering. For example, given the following:

<style scoped>
div {
    font-size: 5em;
    text-align: center;
}

It renders to:

*[data-static-vue-component] div {font-size: 5em; text-align: center; }

Instead, it should render to the following to properly select tag:

div [data-static-vue-prospect_card] {font-size: 5em; text-align: center; }
@manatlan
Copy link
Owner

manatlan commented Aug 13, 2019

in fact, it's the same issue as #4
the rendering scoped is weird ... (if you want make it : you should use ":scope")
would be fixed

@manatlan manatlan added the bug Something isn't working label Aug 13, 2019
@manatlan
Copy link
Owner

manatlan commented Aug 13, 2019

currently, to bypass ... you should try :

<style scoped>
:scope {
    font-size: 5em;
    text-align: center;
}
</style>

@manatlan
Copy link
Owner

manatlan commented Aug 13, 2019

In fact, something like :

<template>
  <div class="example">hi</div>
</template>
<style scoped>
.example {
  color: red;
}
</style>

should be rendered as :

<style>
.example[data-minimal] {color: red; }
</style>

but it's not the case in the current version !
it's (bad) rendered as :

<style>
*[data-minimal] .example {color: red; }
</style>

so, to make is works : you should prefix all your inline scoped style with prefix ":scope"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants