Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: .bx--content background disruptive for dark themes #9877

Closed
2 tasks done
brunnerh opened this issue Oct 16, 2021 · 7 comments · Fixed by #10992
Closed
2 tasks done

[Bug]: .bx--content background disruptive for dark themes #9877

brunnerh opened this issue Oct 16, 2021 · 7 comments · Fixed by #10992

Comments

@brunnerh
Copy link

Package

carbon-components

Browser

Chrome

Package version

v10.46.0

Description

The .bx--content container which is part of the UI shell (not really documented properly anywhere and not used in the UI shell examples) has a background color that causes poor contrast/visibility in darker themes. For some components it clashes with existing colors.

Examples for the different themes:

image
image
image
image

Maybe .bx--content should not set a background at all?

CodeSandbox example

https://codesandbox.io/s/bx--content-l1bnj

Steps to reproduce

  • Set theme to g90 or g100
  • Add a content container (.bx--content)
  • Add components like ProgressIndicator to it which use conflicting colors

Code of Conduct

@tay1orjones
Copy link
Member

@carbon-design-system/design is there context around why this class applies the background? Should we modify it to not set a background?

@aagonzales
Copy link
Member

I have no clue where that class is coming from. It definitely shouldn't be used within the progress indicator. I think it may be part of the contained tab component though.

I'm not sure why it would be showing up in UI Shell either.

@brunnerh
Copy link
Author

I'm not sure why it would be showing up in UI Shell either.

It performs layout in relation to the shell header and side-nav.

Introduced as part of the shell here:

3ee76bd#diff-4ea1e7accf7f77430fe69e984a086fe5fe13f048d2fe6de761960d3444cbb057

@jnm2377
Copy link
Contributor

jnm2377 commented Nov 22, 2021

The PR you're linking to was just porting over existing UI Shell styles into our new @carbon/styles package that uses sass modules. Nothing new was introduced there. However, we did add theming into the v11 shell. It may be that it's using the wrong token for the background. I feel like I've ran into similar issues with things using the $layer token incorrectly.

@joshblack
Copy link
Contributor

Just wanted to +1 what @brunnerh shared, the Content component uses the $ui-02 background color @aagonzales.

I think the tl;dr for this component is that we wanted a way to wire up the "skip to content" links with the "main" content area on the page.

metonym added a commit to metonym/carbon that referenced this issue Mar 14, 2022
kodiakhq bot added a commit that referenced this issue Mar 24, 2022
* fix(content): remove background color from .bx--content

Fixes #9877

* chore: update snaps

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Taylor Jones <taylor.jones826@gmail.com>
Co-authored-by: Taylor Jones <tay1orjones@users.noreply.github.com>
@metonym
Copy link
Collaborator

metonym commented Apr 22, 2022

This issue was fixed by #10992 but was not auto-closed by GitHub.

Can an admin close this?

@brunnerh
Copy link
Author

I can :)

Repository owner moved this from ⏱ Backlog to ✅ Done in Design System Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

7 participants