Shopify / slate

Slate is a toolkit for developing Shopify themes. It's designed to assist your workflow and speed up the process of developing, testing, and deploying themes.
https://shopify.github.io/slate
MIT License
1.28k stars 364 forks source link

Sass not compiling when using Chinese Characters #998

Closed victorjanin closed 5 years ago

victorjanin commented 5 years ago

Problem

Sass not compiling when using Chinese Characters

Replication steps

With latin characters text is works

.product-single__add-to-cart .btn {
    &.is-added {
      &::after {
        content: "hello";
      }
    }
  }

With Chinese Characters it doesn't compile the scss file.

.product-single__add-to-cart .btn {
    &.is-added {
      &::after {
        content: "添加至愿望单";
      }
    }
  }

Any ideas? Thank you! Victor

justinmetros commented 5 years ago

This is not an issue with Slate but rather Sass. This thread should hopefully help.

victorjanin commented 5 years ago

@justinmetros Thx for pointing that out, I experimented with that with no luck.

I used content: "添加至愿望单"; with Timber, and I tried it on other projects and sass compiles it fine. When using it in Slate, I get no error in the terminal when compiling it, but I get a "net::ERR_ABORTED 422" error on my console and the layout.theme.styleLiquid.scss.css file only contains "Failed to compile SCSS file"

Even adding the chinese in a variable doesn't work like $isAddedChinese: " "添加至愿望单"'

Or even commented out // content: "添加至愿望单";

victorjanin commented 5 years ago

I made it work by putting the chinese characters in the theme.scss and not the theme.scss.liquid

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.