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

    QCard assumes any color I set is dark?

    Help
    5
    7
    1183
    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.
    • tmladek
      tmladek last edited by tmladek

      Hello, I’ve noticed that no matter what color I pass as the color prop to QCard, it colors the text white and adds a q-card-dark class to the outermost <div> of the QCard, which also causes the separator to be white.

      This happens even when setting the color to white, which means the QCard appears completely blank.

      Is this a bug? Or can this be overriden? I know I can pass the textColor prop to override the text color, but this doesn’t change the color of the separator.

      1 Reply Last reply Reply Quote 0
      • Hawkeye64
        Hawkeye64 last edited by

        That does not happen in my code. There must be something wrong. Here’s an example. I’m using sockets to send database notifications to the client. If the sockets goes down, I show this modal that uses q-card:

        <template>
          <q-modal v-model="openModal" no-esc-dismiss no-backdrop-dismiss no-route-dismiss position="top" @hide="onClose" style="min-width: 380px;">
            <q-card>
              <q-card-title>
                <q-icon name="fas fa-exclamation-circle" color="red-6" /> Your Connection Has Been Lost
                <q-card-separator></q-card-separator>
              </q-card-title>
              <q-card-main>
        
                <div class="row justify-center">
                  <div class="col">
                    <p>You will be automatically reconnected when the server is available.</p>
                    <p>The server may be down or inaccessible. You could also check if you have an internet connection.</p>
                    <p>If the problem persists contact your System Administrator.</p>
                    <p>{{ serverErrorMessage }}</p>
                  </div>
                </div>
        
              </q-card-main>
            </q-card>
          </q-modal>
        </template>
        
        tmladek 1 Reply Last reply Reply Quote -1
        • tmladek
          tmladek @Hawkeye64 last edited by

          It doesn’t seem like you’re setting the color of the QCard though?

          1 Reply Last reply Reply Quote 0
          • S
            steve last edited by steve

            I am experiencing a similar issue when setting q-card to color=“white”. All text is white and non colored buttons look invisible.
            https://jsfiddle.net/gb8h79o1/4/

             <q-card color="white">
               <q-card-main>
                 <p>You cannot see me!</p>
                 <q-btn label="Peek-a-boo"></q-btn>
                 <q-btn label="I'm White, but inherit" color="white"></q-btn>
               </q-card-main>
             </q-card>
            1 Reply Last reply Reply Quote 2
            • T
              treethought last edited by

              Getting the same issue

              1 Reply Last reply Reply Quote 0
              • tmladek
                tmladek last edited by

                Submitted an issue: https://github.com/quasarframework/quasar/issues/2546

                1 Reply Last reply Reply Quote 0
                • rstoenescu
                  rstoenescu Admin last edited by

                  Added a Boolean dark prop to QCard, to be used only when the color is dark. Will be available in Quasar v0.17.13.

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