I have an Ionic 4 app and I want a transparent header. The Ionic documentation states that ‘fullscreen’ must be added to the ion-content, and that ‘translucent’ must be added to the ion-toolbar.
This does not work and always leaves the toolbar at the top. I have added this to the css as well:
The only way I can find that achieves the affect of a transparent header is when I go to the Shadow DOM in chrome and add a background attribute to the class ‘inner-scroll’
However there are no variables associated with background color in this class and so I cannot change the background using this method.
How can I make this transparent header/toolbar work!?
yes this is the correct way. At the time I hadn’t fully looked into he css variables that control the shadow DOM for the Ionic components - in case anyone else is having issue with styles, find the variables with the developer tools and life becomes much easier
I believe there must be an issue with ionic 4+ itself with regards to translucent headers. I’ve been trying to get a translucent header working for over an hour today here, and so far none of the specified settings in the ionic 4 documentation seem to work.
All to no avail. The interesting thing is, I have used backdrop-filter myself in other areas of the app, and those are working. So I know that backdrop filter works on both Chrome on desktop, as well as Safari on iPhone. I think the base styles in ionic 4 must somehow be preventing backdrop-filter from working to produce a translucent (frosted glass like) header.