Title: 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. · Issue #8594 · NativeScript/NativeScript · GitHub
Open Graph Title: 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. · Issue #8594 · NativeScript/NativeScript
X Title: 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. · Issue #8594 · NativeScript/NativeScript
Description: Environment % tns info ✔ Component nativescript has 6.5.0 version and is up to date. ✔ Component tns-core-modules has 6.5.1 version and is up to date. ✔ Component tns-android has 6.5.0 version and is up to date. ✔ Component tns-ios has 6...
Open Graph Description: Environment % tns info ✔ Component nativescript has 6.5.0 version and is up to date. ✔ Component tns-core-modules has 6.5.1 version and is up to date. ✔ Component tns-android has 6.5.0 version and ...
X Description: Environment % tns info ✔ Component nativescript has 6.5.0 version and is up to date. ✔ Component tns-core-modules has 6.5.1 version and is up to date. ✔ Component tns-android has 6.5.0 version and ...
Opengraph URL: https://github.com/NativeScript/NativeScript/issues/8594
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"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.","articleBody":"**Environment**\r\n```\r\n% tns info\r\n✔ Component nativescript has 6.5.0 version and is up to date.\r\n✔ Component tns-core-modules has 6.5.1 version and is up to date.\r\n✔ Component tns-android has 6.5.0 version and is up to date.\r\n✔ Component tns-ios has 6.5.0 version and is up to date.\r\n```\r\n\r\nUsing an iOS 13 emulator.\r\n\r\n**Describe the bug**\r\nApplying `bg-danger` to a Button does not make the button _red_ when the phone is in dark mode.\r\n\r\nSome CSS attributes seems to require having `.ns-dark` or `.ns-light`, e.g. `border-width` or `border-color`. Otherwise nothing is applied.\r\n\r\n**To Reproduce**\r\n`app-common.scss`\r\n```\r\n// Uncommenting the following fixes the `bg-danger` problem\r\n// .ns-dark .bg-danger {\r\n// background-color: const(error);\r\n// opacity: 1;\r\n// }\r\n\r\n.border-color {\r\n border-width: 2px 2px 2px 2px;\r\n border-color: green;\r\n}\r\n\r\n.ns-light .border-color2,\r\n.ns-light .border-color3,\r\n.ns-dark .border-color2,\r\n.ns-dark .border-color3 {\r\n border-width: 2px 2px 2px 2px;\r\n border-color: green;\r\n}\r\n.border-color3 {\r\n border-radius: 20px;\r\n}\r\n```\r\n\r\n`home.component.html`\r\n```\r\n \u003cStackLayout\u003e\r\n \u003cLabel class=\"bg-danger\" text=\"Expecting bg-danger: OK with labels!\"\u003e\u003c/Label\u003e\r\n \u003cButton class=\"bg-danger\" text=\"Expecting bg-danger: only in light mode\"\u003e\u003c/Button\u003e\r\n \u003cButton class=\"border-color\" text=\"Expecting green borders: never\"\u003e\u003c/Button\u003e\r\n \u003cButton class=\"border-color2\" text=\"But OK if ns-dark/light specified\"\u003e\u003c/Button\u003e\r\n \u003cButton class=\"border-color3\" text=\"Note that border-radius works as expected!\"\u003e\u003c/Button\u003e\r\n \u003c/StackLayout\u003e\r\n```\r\n\r\n\u003cimg width=\"769\" alt=\"image\" src=\"https://user-images.githubusercontent.com/1008816/82646386-d5e42880-9c14-11ea-9ddc-89fbf5c64f8e.png\"\u003e\r\n\r\n**Expected behavior**\r\n\r\nCSS being applied without `.ns-dark`, `.ns-light` specifiers.\r\n\r\n**Sample project**\r\nI've done this. (Question: is it possible to test it within an emulator without downloading the project?) After downloading it and running it, the bg-danger problem is still here and the border problems are a bit different, but the version used seems to be 6.5.0 instead of 6.5.1.\r\n\r\nhttps://play.nativescript.org/?template=play-ng\u0026id=yicNoo","author":{"url":"https://github.com/boutier","@type":"Person","name":"boutier"},"datePublished":"2020-05-22T09:03:21.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/8594/NativeScript/issues/8594"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ef24b77e-892f-d355-0135-7d88da48a1e2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C7EE:2CE953:1F3C628:295588E:6A5C9B33 |
| html-safe-nonce | 77f48f9c37e4d2566fe6e7f16f5ad92dccd16b41d09ceee10ef4f6cacbff6cda |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDN0VFOjJDRTk1MzoxRjNDNjI4OjI5NTU4OEU6NkE1QzlCMzMiLCJ2aXNpdG9yX2lkIjoiMjA3NDg0ODUzNzI2NDAzNjY1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9fd43ee8589d0495123b80d5808bda802639762dd60fc6e24060683f73a2d29d |
| hovercard-subject-tag | issue:623065370 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/NativeScript/8594/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a3f3231b9e6fb89890ae32887cee63f6103d0bb447f08174f1c3bd8b7f67d8fb/NativeScript/NativeScript/issues/8594 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a3f3231b9e6fb89890ae32887cee63f6103d0bb447f08174f1c3bd8b7f67d8fb/NativeScript/NativeScript/issues/8594 |
| og:image:alt | Environment % tns info ✔ Component nativescript has 6.5.0 version and is up to date. ✔ Component tns-core-modules has 6.5.1 version and is up to date. ✔ Component tns-android has 6.5.0 version and ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | boutier |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/NativeScript git https://github.com/NativeScript/NativeScript.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 31492490 |
| octolytics-dimension-repository_nwo | NativeScript/NativeScript |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31492490 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/NativeScript |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width