Create custom colors to use with components



  • a simple Stylus code to create your own colors to use with components like: class=“text-cv-blue-1”.
    I think it simplifies the creation of new colors. Could also be used to create the different tints for each color…

    $cv = {
      id: "cv",
      color: {
        blue-1: #97d2f0,
        blue-2: #30b1ff,
        blue-3: #009ce0,
        blue-4: #0285be,
        blue-5: #235775,
        blue-6: #323437,
        blue-7: #2a749a,
      }
    }
    
    // generate colors from object
    for name, color in $cv.color
      .bg-{$cv.id}-{name}
        background-color color
      .text-{$cv.id}-{name}
        color color
    

Log in to reply
 

Looks like your connection to Quasar Framework was lost, please wait while we try to reconnect.