MMJ
MMJ

Reputation: 309

Sass mixin not exporting/importing prefixes

I want to do a simple sass mixin for background gradient:

@mixin primary-gradient {
  background: -webkit-radial-gradient(bottom right, #41bfb8, #1e989f);
  background: -moz-radial-gradient(bottom right, #41bfb8, #1e989f);
  background: radial-gradient(to top left, #41bfb8, #1e989f);
  background: #41bfb8;
}

This mixin compiled like this:

enter image description here

Where did the background: -webkit-radial-gradient(bottom right, #41bfb8, #1e989f); go? am I missing something?

Upvotes: 0

Views: 67

Answers (1)

Alessandro_Russo
Alessandro_Russo

Reputation: 2231

Probably it's your configuration that removes some prefixed properties, maybe with PostCSS.

Try my CodePen here it's work.

I've inverted the background so it can be overwritten by the gradient.

@mixin primary-gradient {
  background: #41bfb8;
  background: -webkit-radial-gradient(bottom right, #41bfb8, #1e989f);
  background: -moz-radial-gradient(bottom right, #41bfb8, #1e989f);
  background: radial-gradient(to top left, #41bfb8, #1e989f);
}

Upvotes: 1

Related Questions