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

    [Solved] style selected route-tab diferently from the rest

    Help
    3
    5
    520
    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.
    • L
      lazaroofarrill last edited by lazaroofarrill

      I wan’t to give the selected tab a bolder font weight, Since there is an active-color and active-bg-color property, I guess there’s gotta be a way of achieving this as well. Thanks in advance.

      I 1 Reply Last reply Reply Quote 0
      • I
        Ilia @lazaroofarrill last edited by Ilia

        @lazaroofarrill try this one

        .q-tab--active .q-tab__label {
          color: red;
          font-weight: 300;
        }
        
        L 1 Reply Last reply Reply Quote 1
        • L
          lazaroofarrill @Ilia last edited by

          @Ilia nope, didn’t work. I’m using a router-tab, don’t know if that makes any difference.

          <template>
          ...
          <q-tabs active-color="primary" align="left" class="custom-tab" dense>
                  <q-route-tab :key="tab.label" :to="tab.to"
                               v-for="tab in headerRoutes" class="q-tab__label">
                    {{tab.label}}
                  </q-route-tab>
          </q-tabs>
          ...
          </template>
          <style lang="scss" scoped>
          .custom-tab {
              font-size: 12pt;
            }
          
            .q-tab__active .q-tab__label {
              font-weight: 900;
            }
          </style>
          
          metalsadman 1 Reply Last reply Reply Quote 0
          • metalsadman
            metalsadman @lazaroofarrill last edited by metalsadman

            @lazaroofarrill try it with deep selector /deep/, >>> or ::v-deep since you are using scoped.

            L 1 Reply Last reply Reply Quote 2
            • L
              lazaroofarrill @metalsadman last edited by

              @Ilia & @metalsadman thanks a lot didn’t know that about the scoped property

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