Using dark theme

Hi there,
Just started playing with ionic and I found this doc: http://ionicframework.com/docs/v2/theming/theming-your-app/ about setting a dark theme to my app, however, I could not make it work.
what I did is to add this:
@import "themes/dark";
into this file: “C:\ionic\ionic test\scss\ionic.app.scss” just before this line
@import "www/lib/ionic/scss/ionic";
however it did not change my app.
any advice?

Did you setup sass ?

* Setup this project to use Sass: ionic setup sass
* Develop in the browser with live reload: ionic serve

Thanks for the reply.
I’ve already setup sass and tested the app in chrome and on my android device.
Are the changes I made to the files correct?

Are you seeing any other changes you make in the .scss file?
Is this file being watched if you do ionic serve?

I am seeing changes in my app after changing elements in the ionic.app.scss file. however when adding @import "themes/dark";

looks like there is no “dark.scss” can you locate a “themes/dark” folder/.scss file?

The beauty of Git.

The reference to how to use the dark theme was removed from the page you linked to on 28th September 2015. You can see the changes here:

The actual dark theme file was removed from the repo (but not history) on 5th December 2015. You can see it’s final contents here:
https://github.com/driftyco/ionic2/commit/78a3ce12b17e6acdf9cf502d0f629bac2d3e1257

Finally. Ionic has moved on since then though, so it may not be a case of copy and paste.

Wrote a very quick post with a solution that works today (8th January 2016) but may not work any time after today due to the project still being in Beta. https://medium.com/@hjbme/dark-theme-in-ionic-2-beta-as-of-today-d54e3fd89217

1 Like