3

I am upgrading to Ionic 4. How can I import mixins globally and having to import the file in every sass that uses a mixin? I've tried editing angular.json, global.scss and variables.scss but no luck.

It should be adding the import to global with the line @import "./mixins";. I've tried adding it as the first line and the last line.

Xerri
  • 4,916
  • 6
  • 45
  • 54

1 Answers1

1

In ionic 4 i manually added file "ionic.mixin.scss" under folder theme and I have imported it into the .scss file to consume it. It's works fine!

  • 3
    I want to import it once and have it available everywhere not having to import it every time I need a mixin. – Xerri Oct 31 '18 at 04:23
  • but you need to import it file by file. You cannot import it on a global one as we used to do with Ionic 3 – Dani Dec 16 '19 at 19:20