Skip to content

Commit c625bdb

Browse files
committed
fix(theming): move text selection text color into variable
Signed-off-by: Jonas <jonas@freesources.org>
1 parent 2c94ef0 commit c625bdb

File tree

9 files changed

+9
-7
lines changed

9 files changed

+9
-7
lines changed

apps/theming/css/default.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
--color-info-text: #0066AC;
4444
--color-favorite: #A37200;
4545
--color-background-selection: rgb(from var(--color-primary-element) r g b / 0.2);
46+
--color-text-selection: var(--color-main-text);
4647
/** @deprecated use css color functions */
4748
--color-error-rgb: 255,231,231;
4849
/** @deprecated use css color functions */

apps/theming/lib/Themes/DarkTheme.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ public function getCSSVariables(): array {
116116
'--color-info-text' => $colorInfoText,
117117
'--color-favorite' => '#ffde00',
118118
'--color-background-selection' => 'rgb(from var(--color-primary-element) r g b / 0.4)',
119+
'--color-text-selection' => 'var(--color-main-text)',
119120
// deprecated
120121
'--color-error-rgb' => join(',', $this->util->hexToRGB($colorError)),
121122
'--color-warning-rgb' => join(',', $this->util->hexToRGB($colorWarning)),

apps/theming/lib/Themes/DefaultTheme.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,7 @@ public function getCSSVariables(): array {
166166
'--color-info-text' => $colorInfoText,
167167
'--color-favorite' => '#A37200',
168168
'--color-background-selection' => 'rgb(from var(--color-primary-element) r g b / 0.2)',
169+
'--color-text-selection' => 'var(--color-main-text)',
169170
// deprecated
170171
'--color-error-rgb' => join(',', $this->util->hexToRGB($colorError)),
171172
'--color-warning-rgb' => join(',', $this->util->hexToRGB($colorWarning)),

apps/theming/lib/Themes/HighContrastTheme.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public function getCSSVariables(): array {
9999

100100
'--color-favorite' => '#936B06',
101101
'--color-background-selection' => 'var(--color-primary-element)',
102+
'--color-text-selection' => 'var(--color-primary-element-text)',
102103

103104
'--color-scrollbar' => 'auto transparent',
104105

@@ -132,9 +133,6 @@ public function getCustomCss(): string {
132133
#app-navigation {
133134
border-right: 1px solid var(--color-border);
134135
}
135-
::selection {
136-
color: var(--color-primary-element-text);
137-
}
138136
";
139137
}
140138
}

core/css/server.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/server.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/styles.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/styles.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/css/styles.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ body {
178178

179179
::selection {
180180
background-color: var(--color-background-selection);
181+
color: var(--color-text-selection);
181182
}
182183

183184

0 commit comments

Comments
 (0)