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

    Q-table SASS for a specific file

    Framework
    2
    4
    626
    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.
    • K
      keechan last edited by

      Hello,

      I have several vue files, each of which has multiple tables (and ~10 columns each).

      I want to be able to style q-tables in such a way that all q-tables per file will have the same style.

      Currently I have something like this:

      <style lang="sass" >
      .q-table--dense
        .q-table
          th, td
            white-space: normal
            border: 0.5px solid grey-1
          thead tr, tbody tr, tbody td
            max-width: 300px
          tbody td
            font-family: "Consolas"
            font-size: 14px
      </style>
      

      But this overwrites the entire q-table and all other q-tables from other files are getting this styling.

      Is there a way to make this ‘local’? I do not want to specifically change this per column as it will cause too much work considering the many, many tables and columns… Thanks!

      1 Reply Last reply Reply Quote 0
      • J
        jraez last edited by

        I guess you can use vue scoped css.

        https://vue-loader.vuejs.org/guide/scoped-css.html

        K 1 Reply Last reply Reply Quote 0
        • K
          keechan last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • K
            keechan @jraez last edited by

            @jraez Great, works perfect! Thanks much!

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