Skip to content

修复style中对page标签添加scoped-id的bug #31

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
wants to merge 1 commit into from

Conversation

steinslin
Copy link
Member

<style scoped>
page {
  background: #f0f0f0;
}
</style>

编译后

page {
  background: #f0f0f0;
}

@anchengjian
Copy link
Member

anchengjian commented Jul 7, 2018

按照我的理解,page这种全局的样式应该写在非 scoped 的 style 中吧

<style>
page {
  background: #f0f0f0;
}
</style>

<style scoped>
... some code
</style>

@F-loat
Copy link
Member

F-loat commented Jul 7, 2018

说起来,小程序页面的 css 本身就不是全局的,所以只有组件里才有必要用 scoped 吧

@steinslin
Copy link
Member Author

steinslin commented Jul 8, 2018

不过有很多会这样写,然后page的样式就不生效了...

@aOrz
Copy link
Contributor

aOrz commented Jul 16, 2018

建议使用如下形式,不建议合入。

<style>
page {
  background: #f0f0f0;
}
</style>

不建议合入。

@aOrz aOrz closed this Jul 16, 2018
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

Successfully merging this pull request may close these issues.

4 participants