mercredi 26 août 2020

Use random gradient from my own Custom list for the Bacckground ( SCSS )

I have my few own combinations of gradient that I want to use in my the website background in different areas.

I want them to Change every time the page refreshes.

I have already coded the gradient at different paces with different degree on gradient angle using 2 variables

$primary-color

$secondary-color

Now, In my variables.scss file, I want to get random pair of primary and secondary color to be taken as these variables value.

Gradient Combinations:

  1. #ffafbd → #ffc3a0

  2. #2193b0 → #6dd5ed

  3. #cc2b5e → #753a88

I want user to experience any one of the above gradient as the background of different <div> tags ( on which i have applied the gradient code ) every time they refresh or new user enters my website

Aucun commentaire:

Enregistrer un commentaire