Today’s conundrum, why does one particular Glyphicon Halflings icon display differently between browsers? I have several other icons and they are all correctly displaying black and white. Yet this one icon – calendar – on the same page, same code, displays differently across my browsers.
On FireFox and Safari it displays in colour:
On IE it displays in black and white:
On Chrome it doesn’t display at all:
The markup is straightforward:
Finally tracked down this answer on Stackoverflow:
There is most likely an issue with inclusion of Glyphicons on BootstrapCDN 3.0.0 version. When 3.0 was released the glyphicons were in a separate repo, and then combined into the Bootstrap baseline again later around 3.0.1.
I updated the CSS CDN include from:
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet">
to:
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
and my calendar icon is now correctly displaying as black and white across all browsers.
Filed under: Geeky, Programming Tagged: Glyphicon
