Skip to content

Commit ee5a157

Browse files
authored
Merge pull request #4730 from manyfold3d/dark-mode-tomselect
Fix unreadable tomselect dropdowns in dark mode or dark themes
2 parents c3b69dd + 8881990 commit ee5a157

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

app/assets/stylesheets/application.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ $ra-font-path: "https://cdn.jsdelivr.net/npm/@infinizhen/rpg-awesome-continued@1
2121
@import '@uppy/core/dist/style.min';
2222
@import '@uppy/dashboard/dist/style.min';
2323

24+
@import 'src/dark-theme-overrides';
25+
2426
.ts-control {
2527
padding: 1px;
2628
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@mixin tom-select-dark-mode() {
2+
3+
#model_tag_list-ts-dropdown,
4+
.ts-wrapper .ts-control input,
5+
.ts-wrapper .ts-dropdown .ts-dropdown-content .option {
6+
color: #fff !important;
7+
-webkit-text-fill-color: #fff !important;
8+
}
9+
10+
.ts-dropdown .active {
11+
background-color: #375a7f !important;
12+
}
13+
}
14+
15+
@media (prefers-color-scheme: dark) {
16+
@include tom-select-dark-mode();
17+
}
18+
19+
body.darkly-theme,
20+
body.cyborg-theme,
21+
body.slate-theme {
22+
@include tom-select-dark-mode();
23+
}

app/views/layouts/application.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<%= yield :head %>
1616
</head>
1717

18-
<body>
18+
<body class="<%= "#{SiteSettings.theme}-theme" %>">
1919
<%= skip_link "content", t(".skip_to_content") %>
2020
<%= render "application/navbar" %>
2121
<%= yield :breadcrumbs %>

0 commit comments

Comments
 (0)