创建文件mixnis.styl
ellipsis()
overflow: hidden
white-space: nowrap
text-overflow: ellipsis
variables 变量
建一个variables.styl
$bgColor = #00bcd4
$darkTextColor = #333
$headerHeight = .86rem
在Vue中引用css,要用@import 并且在路径前加"~"
@import '~styles/varibles.styl'
穿透,在vue中,组件的css作用域现在在当前组件,在style上加scoped 属性
穿透
<style lang="stylus" scoped>
.header >>> .swiper-content {
}
</style>