htmlquasar

How do I change the color of text in Quasar?


I tried

<p color="primary">foo</p>

and

<p style="color: primary">foo</p>

but neither works. How do I make my text colour primary?


Solution

  • instead of

    <p style="color: primary">foo</p>
    

    try this

    <p style="color: primary;">foo</p>
    

    or you can use something like this:

    <style>
        .primary-color {
            color: primary;
        }
    </style>
    
    <p class="primary-color">foo</p>
    

    how ever if you have any custom color code you have to replace it like this

    .primary-color {
        color: #ffffff; /* Replace #ff0000  */
    }