How can I use Stylus`s function on global of quasar ?
-
Hi all,
There is a function of stylus in local scope. It worked well.
like this:// component/test.vue <style lang="stylus" type="text/stylus" scoped> px2rem(p) $fontSize = 37.5 (p / $fontSize)rem .ebook position: relative; // 使用相对布局 .read-wrapper .mask .left flex: 1 1 px2rem(100) background-color #faa0b1 </style>
But if the function was removed to src/css/app.styl , It didn`t work.
// css/app.styl px2rem(p) $fontSize = 37.5 (p / $fontSize)rem // component/test.vue <style lang="stylus" type="text/stylus" scoped> .ebook position: relative; // 使用相对布局 .read-wrapper .mask .left flex: 1 1 px2rem(100) background-color #faa0b1 </style>
I want to set a function on global (i.e. src/css/app.styl), and use it in local file (i.e. src/components/XXXX.vue).
I will appreciate this if any help. Thanks.