• Resolved lennertdaniels

    (@lennertdaniels)


    Closing the cookie bar by clicking ‘X’ will javascript-add a display: none; to the element, effectively hiding it.
    Thus, after reloading the page, because cookies have been accepted, the cookie bar should be hidden by default. It is, but it is now hidden through the use of opacity: 0, which only makes the bar non-visible. If the bar happens to overlay any links on the page, the non-visible bar will prevent you from clicking those links.

    With the default styling, the bar happens to be completely out of the way, never overlaying any other element. However, with custom styling, this easily becomes a problem.

    I suggest changing opacity: 0 to display: hidden as the default hiding method.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Gareth

    (@catapult_themes)

    Hi

    The current version uses opacity: 0 and max-height: 0 as the default method to hide the bar. This should prevent any issues with other content on the page.

    Gareth

    • This reply was modified 7 years, 3 months ago by Gareth.
    Thread Starter lennertdaniels

    (@lennertdaniels)

    Hmm, I see. That would indeed hide the bar.

    Upon further inspection, the culprit seems to be the padding that I added after dequeueing the default stylesheet in the plugin settings.
    I’ve set mine to padding: 15px 20px, just like the original. However, the orginal stylesheet resets to padding: 0 20px when the bar should be hidden, while the custom styling does not…

    May I ask if there’s any reason against using display: none? Eager to learn, that’s all.

    Gareth

    (@catapult_themes)

    I think it might be connected to animating the bar when it’s closed.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘“Opacity: 0” with custom styling makes other content non-clickable’ is closed to new replies.