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

set $modal-content-color (null value) to --#{$prefix}body-color in _variables.scss #39977

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

confidential-nt
Copy link

@confidential-nt confidential-nt commented May 12, 2024

Description

Identified that $modal-content-color was set to null, which could lead to display issues in React Bootstrap Modals. Changed the value to --#{$prefix}body-color to ensure consistency and correct color application in modal components.

Motivation & Context

The modal text color was defaulting to black inside modals when using the data-bs-theme="dark" attribute.(React Bootstrap Modal Component) This was due to the bs-modal-color variable not being set, originally left as null likely for flexibility before the introduction of dark theme support.

Updated bs-modal-color to ensure appropriate text color contrasts when the dark theme is applied, avoiding visibility issues and improving user experience with dark modals. This change is essential as the use of data-bs-theme="dark" indicates a requirement for dark mode compatibility, which should logically include readable text colors.

Before

KakaoTalk_Photo_2024-05-12-21-37-31

After

KakaoTalk_Photo_2024-05-12-21-37-18

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

react-bootstrap/react-bootstrap#6796

Identified that $modal-content-color was set to null, which could lead
to display issues in React Bootstrap Modals. Changed the value to --#{$prefix}body-color
to ensure consistency and correct color application in modal components.
@confidential-nt confidential-nt requested a review from a team as a code owner May 12, 2024 12:19
@confidential-nt confidential-nt changed the title Fix null modal-content-color in modal.scss set $modal-content-color (null value) to --#{$prefix}body-color in _modal.scss May 12, 2024
@confidential-nt confidential-nt changed the title set $modal-content-color (null value) to --#{$prefix}body-color in _modal.scss set $modal-content-color (null value) to --#{$prefix}body-color in _variables.scss May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs review
Development

Successfully merging this pull request may close these issues.

None yet

2 participants