Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(core): .ns-light and .ns-dark doesn't apply through to dialogs #10201

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

Merged

Conversation

dgmachado
Copy link
Contributor

@dgmachado dgmachado commented Feb 3, 2023

PR Checklist

What is the current behavior?

When triggering alert() or dialogs.confirm (from @nativescript/core/ui/dialogs), the button color is expected to follow the style of "Button" type selector defined on the css.

It works fine, however, when .ns-light or .ns-dark identifier is added in front of "Button" or "Label", it is not recognizable and does not take effect.

Please see the app.scss file below:

.ns-light Label {
  color:green;
} 

.ns-dark Label {
  color:orange;
}

.ns-light Button {
  color:yellow;
} 

.ns-dark Button {
  color:brown;
} 
before-bugfix.mov

There're open issues for this same bug:

  1. .ns-dark doesn't apply through to dialogs #8484
  2. Wrong Dialog colors on android in dark mode and no way to handle dark/light mode #9462
  3. At least on iOS, some CSS styles are not applied without .ns-dark / .ns-light ; e.g. bg-danger is not applied to Buttons in dark mode. #8594

What is the new behavior?

The css style is being applied properly.

after-bugfix.mov

@nx-cloud
Copy link

nx-cloud bot commented Feb 3, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 4e7228b. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 2 targets

Sent with 💌 from NxCloud.

@cla-bot cla-bot bot added the cla: yes label Feb 3, 2023
@NathanWalker NathanWalker added this to the 8.5 milestone Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants