• Resolved Babak Fakhamzadeh

    (@mastababa)


    When arriving on an AMP page of mine, the links in the page are yellow. This is my standard link color.

    On iOS, when scrolling to the end of the page (using AMP), then pressing a “Go to top” link, the links turn black.

    Inspecting the links on the page, the links respond to this CSS:

    .amp-mode-mouse a, .amp-mode-mouse a:visited {}

    However, inspecting the page, there is no element with the .amp-mode-mouse class.

    When the links are yellow (that is, on first load), the links do not respond to the above CSS. instead, they respond to this:

    a, a:visited {}

    The body of the page has an .amp-mode-touch class.

    Simulating a mobile device on desktop, the links are black. On desktop, the body has the .amp-mode-mouse class.

    I do not want the links to be yellow. I want them to be black.

    I have an /amp folder inside my theme, which takes care of displaying the AMP pages. But none of these files contains any CSS.

    I now add a tiny bit of CSS to /amp/single.php:

    .amp-mode-touch a, .amp-mode-touch a:visited {}

    This works, it turns the links, on first load, black. But this feels like a hack. And, because the above problem did not happen at least at some point in the past, this is likely not the ‘best’ way to resolve this problem.

    Where should I make changes to the appropriate settings to have my links behave in the same way in ‘amp-mode-touch’ and ‘amp-mode-mouse’?

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘amp-mode-mouse and amp-mode-touch’ is closed to new replies.