To start off, I've tested the below code in most of the major browsers; Chrome, Firefox, IE, and Safari.
The exact problem so far only occurs in Chrome when google maps is included in the page, and it is that when giving focus to a navbar link(either through a click or through chrome dev tools), the color of the links fades a very slight amount.
I've tried numerous 'fixes' for this that I've found through research. To name a few:
- Why is an embedded google map altering Safari's font rendering?
- Google Maps v3 - prevent API from loading Roboto font
- Bug: visualRefresh causes Roboto web font to be reloaded/redefined
I've been doing all my testing(save the prior mentioned browsers) on Chrome v43.0.2357.132 m.
To the question I haven't really asked yet, is anyone aware of a fix or work-around for this?
var map;
function initialize() {
map = new google.maps.Map(document.getElementById('map-canvas'), {
zoom: 8,
center: {lat: -34.397, lng: 150.644}
});
}
google.maps.event.addDomListener(window, 'load', initialize);
#map-canvas {
height: 400px;
margin-top: 51px;
width: 100%;
}
nav a.navbar-brand, nav a span, nav a {
color: #C52D2D !important;
}
<script src="https://maps.googleapis.com/maps/api/js?v=3.js"></script>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<nav class="navbar navbar-inverse navbar-fixed-top" id="my-navbar">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Brand</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
<a href="#">Link 1</a>
</li>
<li>
<a href="#">Link 2</a>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div id="map-canvas"></div>