{"id":81,"date":"2019-12-03T12:49:05","date_gmt":"2019-12-03T12:49:05","guid":{"rendered":"https:\/\/potatodie.nl\/diffuse-write-ups\/?p=81"},"modified":"2019-12-07T14:31:06","modified_gmt":"2019-12-07T14:31:06","slug":"order-pseudoclasses","status":"publish","type":"post","link":"https:\/\/potatodie.nl\/diffuse-write-ups\/order-pseudoclasses\/","title":{"rendered":"Order pseudo-classes"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The order of definition of pseudo-classes for the anchor tag is crucial.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In Firefox I noted that if you define <code>:visited<\/code> after <code>:hover<\/code>,  you may not get the style you expect when hovering over an <code>&lt;a&gt;<\/code> element. That&#8217;s logical, if you think of it. But it can be confusing because the Inspector seems to ignore the style for <code>:visited<\/code>, leaving us clueless.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looking for clues I checked Chrome too. The problem did not occur there, but that was because I hadn&#8217;t visited the page the link was pointing to yet.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The recommended order is<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><code>:link<\/code><\/li><li><code>:visited<\/code><\/li><li><code>:hover<\/code><\/li><li><code>:active<\/code><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>The order of definition of pseudo-classes for the anchor tag is crucial. In Firefox I noted that if you define :visited after :hover, you may not get the style you expect when hovering over an &lt;a&gt; element. That&#8217;s logical, if you think of it. But it can be confusing because the Inspector seems to ignore [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,7],"tags":[11,10,9],"class_list":["post-81","post","type-post","status-publish","format-standard","hentry","category-css","category-web-development","tag-anchor-tag","tag-inspector","tag-pseudoclasses"],"acf":[],"_links":{"self":[{"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/posts\/81","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/comments?post=81"}],"version-history":[{"count":6,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/posts\/81\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/posts\/81\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/media?parent=81"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/categories?post=81"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/potatodie.nl\/diffuse-write-ups\/wp-json\/wp\/v2\/tags?post=81"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}