Tapas Mukherjee
Tapas Mukherjee

Reputation: 2178

linear-gradient not working in ionic3

I am trying to create a new gradient color in my Ionic3 variable.sass file.

$colors: (
  primary:    #4471C1,
  secondary:  #32db64,
  danger:     #f53d3d,
  light:      #f4f4f4,
  dark:       #222,
  newcolor: linear-gradient(#0fe2f3, #4caefe)
);

This is giving me the following error

The value`` must be a color.

How can I add a gradient color?

Upvotes: 1

Views: 1266

Answers (1)

Sampath
Sampath

Reputation: 65920

You can try as shown below.

app.scss

.toolbar-background {
    background: -webkit-linear-gradient(-55deg, #50a2a7 35%, #e9b44c 100%) !important;
}

UI

When I applied it to my app:

enter image description here

Upvotes: 4

Related Questions