Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17885

Improper contrast on some color themes for the Like button when a page was liked by the current user

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      To reproduce:

      • change the color theme to the Flatly color theme, for example
      • like a page

      Actual result of the like button, after liking the page (it's written with a slightly darker gray on a lighter gray, it's almost unreadable) :

      Expected result:
      The pair of backgound and foreground colors for the button should be such chosen from the color theme as to always ensure contrast (if a background color is set to the button, the corresponding foreground from the color theme should be used).

      The culprit is this:
      https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-like/xwiki-platform-like-ui/src/main/resources/XWiki/Like/LikeUIX.xml#L312 , where the foreground color only is overwritten .
      As a general principle: never set background or foreground without setting the other one as well, and when choosing the pair, choose amongst the existing pairs of the color theme (do not just choose 2 colors from the color theme that "go well" together unless they are explicitly defined as one being the foreground of the other or viceversa, since in another color theme they may not "go well" anymore).

      Attachments

        Activity

          People

            surli Simon Urli
            lucaa Anca Luca
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: