Fixed Mobile browser address bar color not same as site style after recent XF upgrade

Andro

Well-known member
Affected version
2.0.4
As title says. Happens on my own site and here as well. Chrome 65.x

For reference you may read this to know what i am pointing to!
 
Yes, theme-color does not work correctly in the latest xF2.

I found this in PAGE_CONTAINER:
Code:
    <xf:if is="property('metaThemeColor')">
        <meta name="theme-color" content="{{ parse_less_color(property('metaThemeColor')) }}" />
    </xf:if>

but this code, doesn't display any color, also on this official xF2 forum:
1522693300465.webp


To fix this I created custom template modification (in debug mode):

Template: PAGE_CONTAINER
Modification key: fix_theme_color
Description: Fix meta theme-color in xF2
Search type: Simple replacement

Find:
Code:
    <xf:if is="property('metaThemeColor')">
        <meta name="theme-color" content="{{ parse_less_color(property('metaThemeColor')) }}" />
    </xf:if>

Replace:
Code:
        <meta name="theme-color" content="rgb(23, 52, 68)" />

You can change the color rgb(23, 52, 68) with any other color ;-)

I don't know how to display the color from the theme settings so I set my color directly.
 
Thanks this is sorted now for the next release.
Hi Chris, users of my forum are complaining about my white and dark themes showing the opposite colors on the address bar of the Android browser. Can you point me to where I should check this style property? Thanks!
 
Back
Top Bottom