Skip to content

/deep/ doesn't compile exactly like >>> #1035

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

Closed
mathieutu opened this issue Nov 2, 2017 · 1 comment
Closed

/deep/ doesn't compile exactly like >>> #1035

mathieutu opened this issue Nov 2, 2017 · 1 comment

Comments

@mathieutu
Copy link

mathieutu commented Nov 2, 2017

Version

13.3.0

Steps to reproduce

<style scoped>
    >>> .foo {
        font-weight: bold;
    }
</style>

is compiled to:

[data-v-5026efab] .foo {
font-weight: bold;
}

BUT

<style scoped>
    /deep/ .foo {
        font-weight: bold;
    }
</style>

is compiled to:

[data-v-5026efab].foo {
font-weight: bold;
}

What is expected?

Exact same compilation.

What is actually happening?

Note the removed space during the /deep/ compilation.


For me, it comes from theses lines:

if (next.type === 'combinator' && next.value === ' ') {
next.remove()
}

I don't understand why we should remove the space after just in this case. If it's done on purpose this should be documented:

https://vue-loader.vuejs.org/en/features/scoped-css.html
In those cases you can use the /deep/ combinator instead - it's an alias for >>> and works exactly the same.

I can make a PR if you want.

@mathieutu
Copy link
Author

Thanks @yyx990803!

gejgalis pushed a commit to gejgalis/vue-loader that referenced this issue Nov 4, 2017
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

No branches or pull requests

1 participant