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.

when <a> add :href, its color will don't work with css? why?

See original GitHub issue

when I add

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

then

#github { color: #fff; }

and

data: {
 "github": "https://github.com/"
}

when I will open it on safari, link’s color sometime will don’t work with css, It’s going to be black, not #fff . when I will open it on chrome, link’s color will change from black to white.

but I replace :href="github" to href="https://github.com/" , then it’s work fine.

How to solve this problem?

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
ktsncommented, Jul 18, 2016

It can be reproduced without Vue.js, looks like a Safari’s bug. https://jsfiddle.net/ktsn/he2pf46d/1/

It would be avoid by adding v-if and hide the link until you receive the data. https://jsfiddle.net/evdeayjb/

0reactions
cong-mincommented, Jul 19, 2016

[link removed] it’s demo , please open it, and look top right corner Github , its color is #fff, but sometime it will be black

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS link color not working - Stack Overflow
I have set it against a #778899 background so that the former's snow-white color is visible. Here's the code. a:link { color:#FFFAFA; text- ......
Read more >
Visited Link Color Does Not Change per CSS - WordPress.org
WordPress Twenty Twelve, attempting to change link colors by state, using following code in style.css of child theme: a:link { color: green; ...
Read more >
Link color wont change despite CSS styling - Treehouse
I have noticed that even though I have applied a separate styling to it in CSS, the color of it will NOT CHANGE...
Read more >
HTML/CSS - CSS selectors - 15/23 - link colors not changing
When I hit SAVE/SUBMIT it says it's correct BUT the colors are not changing as they should. The links work fine and so...
Read more >
Links - Usability & Web Accessibility - Yale University
Giving links a different color from the surrounding text is common on the web. Color differences help sighted users, especially users with cognitive...
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