Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

menu: assigning a color to backgroundPalette renders menu unreadable #9100

Closed

Description

@VRathore42

Actual Behavior:

  • What is the issue? * When we assign a color (say blue) to backgroundPalette, the text on md-menu is not barely readable.
  • What is the expected behavior?The color should either be white or black based on the contrastDefaultColor property.

CodePen (or steps to reproduce the issue): *

  • CodePen Demo which shows your issue:http://codepen.io/vrathore42/pen/oLqdxp
  • Details: I used the same colors used to define the blue palette and assigned it to customeBlue. I am assigning this pallet to the backgroundPalette property. Since contrastDefaultColor is "light"i would expect the md-menu text to be white. But that's not the case.

Angular Versions: *

  • Angular Version:
  • Angular Material Version:1.1.0-rc.5

Additional Information:

  • Browser Type: * chrome
  • Browser Version: * 51.0.2704.103 (64-bit)
  • OS: * OS X 10.11.6 (El Capitan)
  • Stack Traces: na

Activity

  1. self-assigned this
    on Jul 22, 2016
  2. clshortfuse commented on Jul 22, 2016

    @clshortfuse
    Contributor

    Seems like the issue is related to https://github.com/angular/material/blob/master/src/components/menu/menu-theme.scss#L5

    I'll investigate more, but it seems like it's not using a contrast color but a hue from the actual background color. I believe, at a glance, I could change that to be {{background-A100-contrast}}

    I might actual shelve this until #8872, so I can apply a opacity for the icon automatically as well.

  3. added
    P2: required
    on Jul 26, 2016
  4. added a commit that references this issue on Aug 2, 2016
    a5b1e5d
  5. added
    has: Pull Request
    and removed
    P2: required
    on Aug 3, 2016
  6. added 2 commits that reference this issue on Aug 16, 2016
    b0a5e5a
    25554da
  7. added this to the 1.1.2 milestone on Aug 22, 2016
  8. added a commit that references this issue on Sep 8, 2016
    aca037f
  9. modified the milestones: 1.1.2, 1.1.4 on Feb 4, 2017
  10. 14 remaining items

  11. added
    a11y
    P2: required
    on Feb 7, 2018
  12. modified the milestones: 1.1.7, 1.2.0 on Feb 7, 2018
  13. added
    needs: demo
    on Aug 26, 2019
  14. changed the title [-]Assigning a color to backgroundPalette renders md-menu unreadable[/-] [+]menu: assigning a color to backgroundPalette renders menu unreadable[/+] on Aug 26, 2019
  15. added a commit that references this issue on Aug 26, 2019
    e673340
  16. removed this from the 1.2.0 milestone on Aug 26, 2019
  17. added and removed
    has: Pull Request
    on Aug 26, 2019
  18. Splaktar commented on Aug 26, 2019

    @Splaktar
    Contributor

    Unfortunately, this CodePen demo is a 404 now. So I can't verify this directly, but I believe this to be fixed in recent releases, including 1.1.20.

    Here are some examples:
    Screen Shot 2019-08-26 at 13 38 11
    Screen Shot 2019-08-26 at 13 38 39
    Screen Shot 2019-08-26 at 13 39 17

    The issue with the toolbar text being white on yellow in the last screenshot should be fixed by PR #11376 (or possibly by follow on PR #11378).

  19. added this to the 1.1.19 milestone on Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2: requireda11yneeds: demoresolution: fixedui: theme

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions