Skip to content

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

Merged
NathanWalker merged 3 commits into
NativeScript:mainfrom
dgmachado:fix/theme-not-apply-for-dialogs
Feb 19, 2023
Merged

NathanWalker merged 3 commits into
NativeScript:mainfrom
dgmachado:fix/theme-not-apply-for-dialogs

Conversation

@dgmachado

@dgmachado dgmachado commented Feb 3, 2023 •

Copy link
Copy Markdown
Contributor

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

nx-cloud Bot commented Feb 3, 2023 •

Copy link
Copy Markdown

☁️ 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