Skip to content

Commit db3ff20

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

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
@@ -44,6 +44,7 @@
4444
--color-favorite: #A37200;
4545
--color-mark: #fff0c7;
4646
--color-background-selection: rgb(from var(--color-primary-element) r g b / 0.2);
47+
--color-text-selection: var(--color-main-text);
4748
/** @deprecated use css color functions */
4849
--color-error-rgb: 255,231,231;
4950
/** @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
@@ -117,6 +117,7 @@ public function getCSSVariables(): array {
117117
'--color-favorite' => '#ffde00',
118118
'--color-mark' => '#4d3800',
119119
'--color-background-selection' => 'rgb(from var(--color-primary-element) r g b / 0.4)',
120+
'--color-text-selection' => 'var(--color-main-text)',
120121
// deprecated
121122
'--color-error-rgb' => join(',', $this->util->hexToRGB($colorError)),
122123
'--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
@@ -167,6 +167,7 @@ public function getCSSVariables(): array {
167167
'--color-favorite' => '#A37200',
168168
'--color-mark' => '#fff0c7',
169169
'--color-background-selection' => 'rgb(from var(--color-primary-element) r g b / 0.2)',
170+
'--color-text-selection' => 'var(--color-main-text)',
170171
// deprecated
171172
'--color-error-rgb' => join(',', $this->util->hexToRGB($colorError)),
172173
'--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
@@ -182,6 +182,7 @@ body {
182182

183183
::selection {
184184
background-color: var(--color-background-selection);
185+
color: var(--color-text-selection);
185186
}
186187

187188

0 commit comments

Comments
 (0)