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

319
May 01, 2017, at 04:59 AM

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?

Answer 1

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

page-pagename {
  .scroll-content {
    background: #DD1155;
  }
}
READ ALSO
How to select and move SVG shapes using Web Speech APi

How to select and move SVG shapes using Web Speech APi

I am using Web Speech API to manipulate SVG Shapes using JavaScriptI can manage to speak commands and make the shapes appear on screen but the problem is I don't know how to select and move the shapes using voice commands

265
How to customize only search.php with CSS without affecting the whole site

How to customize only search.php with CSS without affecting the whole site

Please how can I customize my search page only, with CSSI need this because my home page looks fine but my search results, things are out of where they should be

159
FullCalendar change background color and cursor on day hover

FullCalendar change background color and cursor on day hover

I already checked a few answers here, and found this partial solution using CSS:

323