question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mobile browser addressbar color

See original GitHub issue

6ishfm

The browser addressbar color should be the primary color.

How to do it without tampering with the build system or touching Stylus files: In src/themes.js (maybe later will move the logic to some other file):

  1. Check if running on a mobile browser (import Platform from './platform'):if Platform.is.mobile && !Platform.is.cordova`
  2. Add an absolute positioned DOM element to <body> outside of the viewport (like top -10000px) with bg-primary CSS class. Also give it some height like 10px.
  3. Use window.getComputedStyle(<ELEMENT from above>).getPropertyValue('background') to retrieve the color – which will be the primary color.
  4. Remove the absolute positioned DOM element.
  5. Add the meta tag to <head> using the color determined at step #3.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vuchlcommented, Sep 30, 2016

I’ll implement that over the weekend!

0reactions
rstoenescucommented, Mar 31, 2017

@ag-coder Can you open up a new Github ticket for this pls? “Enhance mobile browser address bar coloring”. I’ll start working on it right now. Will make this optional so every developer can choose to color the addressbar with primary color (default) or another color, or opt out of coloring the address bar. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Change the Color of Address Bar in Mobile Browser to ...
This line is a HTML meta tag used by Google Chrome on Android to change color of address bar in mobile browser. The...
Read more >
Changing Theme Color of Address Bar in Mobile Browsers
The theme color of the address bar in mobile browsers can be changed using the theme-color meta tag. Any CSS color value can...
Read more >
Colorize Mobile Browser Address bar - Plugins - WordPress.org
Colorize Browser Mobile bar plugin will allow you to easily set the color for the browser address bar on mobile devices and phones...
Read more >
Change color of website address bar on Chrome Android ...
More videos on YouTube · Change address bar color to match your brand color on mobile · Grab your desired HEX code –...
Read more >
How can I change the color of header bar and address bar in ...
Include <meta name="theme-color" content="#db4b5d" /> in the HTML <head> tag. · Open Chrome mobile settings: Scroll down to the theme option.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found