Skip to content
This repository has been archived by the owner on Dec 26, 2018. It is now read-only.

SCSS /deep/ implementation from vue-loader #197

Open
ghost opened this issue Jul 19, 2017 · 2 comments
Open

SCSS /deep/ implementation from vue-loader #197

ghost opened this issue Jul 19, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 19, 2017

The CSS feature of /deep/ (SASS) and >>> which was implemented in v12.2.0 of Vue-loader doesn't seem to be in Vueify. Or have I misunderstood something?

.foo >>> .bar { color: red; }
.foo /deep/ .bar { color: red; }
@ghost
Copy link
Author

ghost commented Jul 20, 2017

style-rewrite should have deep alias for >>> combinator, as vue-loader have implemented in version 12.2.0.

Insert below this line.

// ">>>" combinator
if (n.type === "combinator" && n.value === ">>>") {
    n.value = " ";
    n.spaces.before = n.spaces.after = "";
    return false;
}
// /deep/ alias for >>>, since >>> doesn't work in SASS
if (n.type === "tag" && n.value === "/deep/") {
    var next = n.next();
    if (next.type === "combinator" && next.value === " ") {
        next.remove();
    }
    return false;
}

@ghost ghost closed this as completed Jul 20, 2017
@ghost ghost reopened this Jul 24, 2017
ellukesmith added a commit to ellukesmith/vueify that referenced this issue Aug 24, 2017
Added fix for deep selectors as mentioned on vuejs#197
@Gormartsen
Copy link

Here is a changes to ellukesmith@ac70a80

if (n.type === "tag" && n.value === "/deep/") {
    n.spaces.before = n.spaces.after = "";
    var prev = n.prev();
    if (prev.type === "combinator" && prev.value === " ") {
      prev.value = '';
    }
    n.remove();
    return false;
}

Gormartsen added a commit to Gormartsen/vue-visual-markdown-editor that referenced this issue Apr 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant