Evan Bloemer
Evan Bloemer

Reputation: 1081

Ionic 2.2.3 Background Color not Changing on New Page in SCSS File

I created a new page in Ionic 2.2.3, using ionic -g page pagename. I then switched it to the root page and got it all working. The problem is that when I edit it's .scss file to change the background color, it doesn't change the background color, even if I stop the ionic serve and rerun it.

pagename.scss:

page-pagename {
  background: #DD1155;
}

After doing a lot of Googling, I saw people mention app.core.scss under the app/theme folder, but this folder structure doesn't exist under the new Ionic 2.2.3 version. Does anyone know how to change the background color in Ionic 2.2.3 using the .scss file?

Upvotes: 2

Views: 449

Answers (1)

sebaferreras
sebaferreras

Reputation: 44669

Try by setting the background color to the scroll-content class:

page-pagename {
  .scroll-content {
    background: #DD1155;
  }
}

Upvotes: 1

Related Questions