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

lang="sass"不支持 #663

Closed
KevinLongLong opened this issue Dec 18, 2017 · 9 comments
Closed

lang="sass"不支持 #663

KevinLongLong opened this issue Dec 18, 2017 · 9 comments
Assignees
Labels
Fixed inactive Inactive issue, will be auto closed in 7 days

Comments

@KevinLongLong
Copy link

KevinLongLong commented Dec 18, 2017

Error: Invalid CSS after " ": expected 1 selector or at-rule, was "{"
改成scss就可以,参考了之前的issue在wepy.config.js里加入

 sass: {
      indentSyntax: true,
    },

还是不行...

@ciwyaitd
Copy link

lang="scss"

@KevinLongLong
Copy link
Author

@ciwyaitd 改成这个,就不是sass的写法了啊... sass和scss有区别的

@ciwyaitd
Copy link

@KevinLongLong
SCSS 是Sass 3 引入新的语法,其语法完全兼容CSS3,并且继承了Sass 的强大功能

@Gcaufy
Copy link
Collaborator

Gcaufy commented Dec 19, 2017

示例代码呢?

@KevinLongLong
Copy link
Author

KevinLongLong commented Dec 20, 2017

@Gcaufy 找到原因了,还是缩进的问题,就必须像这样顶格写才没有问题

<style lang="sass" rel="stylesheet/sass">
@import "../assets/sass/mixins"
.search
  background-color: #00D58B
  padding: rpx(30)
  .jump-button
    background-color: white
    height: rpx(90)
    border-radius: rpx(16)
    font-size: rpx(50)
    padding-top: rpx(25)
    color: #ddd
    text-align: center
</style>

如果这样写就会报错

<style lang="sass" rel="stylesheet/sass">
  @import "../assets/sass/mixins"
  .search
    background-color: #00D58B
    padding: rpx(30)
    .jump-button
      background-color: white
      height: rpx(90)
      border-radius: rpx(16)
      font-size: rpx(50)
      padding-top: rpx(25)
      color: #ddd
    text-align: center
</style>

@Gcaufy
Copy link
Collaborator

Gcaufy commented Dec 20, 2017

为何不考虑使用scss呢。

@Gcaufy
Copy link
Collaborator

Gcaufy commented Dec 20, 2017

#211
跟这个问题还是比较类似的问题。后面可以修复一下

Gcaufy added a commit that referenced this issue Dec 25, 2017
@Gcaufy Gcaufy self-assigned this Dec 25, 2017
@Gcaufy Gcaufy added the Fixed label Dec 25, 2017
@stale
Copy link

stale bot commented Jun 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
因为这个 Issue 最近没有任何有效回复,所以被自动标记为了stale。 如果在未来7天依旧没有任何激活操作,那么该 Issue 将会被自动关闭。 感谢您的提问。

@stale stale bot added the inactive Inactive issue, will be auto closed in 7 days label Jun 13, 2018
@stale stale bot closed this as completed Jun 20, 2018
@799677446
Copy link

现在是否支持scss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed inactive Inactive issue, will be auto closed in 7 days
Projects
None yet
Development

No branches or pull requests

4 participants