Safari Link Color Issue

by ktsn

HTML

<a id="github" target="_blank">Github</a>

CSS

a {
  color: #ccc;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
}

#github {
  position: absolute;
  top: 25px;
  right: -25px;
  display: block;
  width: 120px;
  height: 20px;
  line-height: 20px;
  background-color: #ddd;
  color: #fff;
  text-align: center;
  transform: rotate(45deg);
}

JavaScript

function getData(done) {
	setTimeout(function () {
  	done({ github: 'https://github.com' })
	}, 1000)
}

getData(function (data) {
	var a = document.getElementById('github')
  a.setAttribute('href', data.github)
})