0

We set ion-content's background color in app.scss or wherever. How can I override it? When I put this into the page's scss:

#page-content {
    background-color: purple;
}

Nothing happens. (Of course I added the id to the tag: <ion-content padding id="page-content">)

Display Name
  • 4,502
  • 2
  • 47
  • 63

4 Answers4

1

You should use color in RGB code.

background-color: #000000;
csantos
  • 177
  • 12
1

Try it with add !important

#page-content {
    background-color: purple!important;
}
Ferry Sanjaya
  • 224
  • 2
  • 17
1

This is how I changed the background:

.scroll-content {
    background-color: white;
}
Display Name
  • 4,502
  • 2
  • 47
  • 63
1

In your Global scss or local scss mention this

ion-content{ --background:white }

Amit Pandey
  • 297
  • 2
  • 8