No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    url() pointing to asset file within stylus

    Help
    2
    4
    1270
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Alinex last edited by

      <style lang="stylus" scoped>
        main
          background: url(~assets/background.jpg) no-repeat center center fixed
      </style>
      

      This gives me the following error:

      Module build failed: Error: /home/alex/github/node-admin-client/src/pages/index.vue:14:20   10| </template>
         12| <style lang="stylus" scoped>
         13|   main { 
         14|     background: url(~assets/background.jpg) no-repeat center center fixed;
      --------------------------^   
      TypeError: expected unit, but got ident:assets 
      

      What can I do to fix this, using the same as CSS works.

      1 Reply Last reply Reply Quote 1
      • A
        Alinex last edited by

        Can anybody help? I made an example here https://codepen.io/anon/pen/GxvYEJ

        C 1 Reply Last reply Reply Quote 0
        • C
          chbarr @Alinex last edited by

          @alinex
          With simple quote for the url, I think it will be ok:

          <style lang="stylus" scoped>
          main
            background: url('~assets/background.jpg') no-repeat center center fixed
          </style>
          
          1 Reply Last reply Reply Quote 1
          • A
            Alinex last edited by

            Thanks, that’s it - so simple.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post