Change background color (cordova-camera-preview)

Hello everyone:

I’m using cordova-camera-preview, and I have to set to transparent (with !important tag) the background color on every html tag (specifically html, body, ion-app , ion-content, page-home) in order to show the camera back of the HTML.

The main problem is when I dismiss the layout in order to show another one, the background is still transparent, and I need to disable this css property.

The .scss sections is:

  background-color: transparent !important;
}```

I know this is a css problem but I didn't found a way to solve this issue. Also, it seems that another person had the same problem https://forum.ionicframework.com/t/i-need-help-ionic-2-change-background-color-only-one-page/72719/2

Thank you for your help!

Regards

Finally, I’ve found a workaround to solve the problem based on this issue

Inside the file src/theme/variables.scss, at the end of the file, you have to put the following line:

$background-color: transparent;

Doing this allows between to choose a background color in every view or not.

Regards