Merge pull request #44034 from nextcloud/fix/favorite-color

feat(theming): Provide CSS variable for favorite color and adjust for dark mode
This commit is contained in:
John Molakvoæ 2024-03-07 11:06:04 +01:00 committed by GitHub
commit 6c04942e2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 14 additions and 25 deletions

View file

@ -65,7 +65,7 @@ export default defineComponent({
<style lang="scss" scoped>
.favorite-marker-icon {
color: #a08b00;
color: var(--color-favorite);
// Override NcIconSvgWrapper defaults (clickable area)
min-width: unset !important;
min-height: unset !important;

View file

@ -37,6 +37,7 @@
--color-info-rgb: 0,113,173;
--color-info-hover: #197fb5;
--color-info-text: #006499;
--color-favorite: #A37200;
--color-loading-light: #cccccc;
--color-loading-dark: #444444;
--color-box-shadow-rgb: 77,77,77;

View file

@ -1,17 +0,0 @@
/* Error: Undefined variable.
* ,
* 38 | $invert: luma($color-primary) > 0.6;
* | ^^^^^^^^^^^^^^
* '
* apps/theming/css/theming.scss 38:15 root stylesheet */
body::before {
font-family: "Source Code Pro", "SF Mono", Monaco, Inconsolata, "Fira Mono",
"Droid Sans Mono", monospace, monospace;
white-space: pre;
display: block;
padding: 1em;
margin-bottom: 1em;
border-bottom: 2px solid black;
content: "Error: Undefined variable.\a \2577 \a 38 \2502 $invert: luma($color-primary) > 0.6;\a \2502 ^^^^^^^^^^^^^^\a \2575 \a apps/theming/css/theming.scss 38:15 root stylesheet";
}

View file

@ -113,6 +113,7 @@ class DarkTheme extends DefaultTheme implements ITheme {
'--color-info-rgb' => join(',', $this->util->hexToRGB($colorInfo)),
'--color-info-hover' => $this->util->lighten($colorInfo, 10),
'--color-info-text' => $colorInfo,
'--color-favorite' => '#ffde00',
// used for the icon loading animation
'--color-loading-light' => '#777',

View file

@ -165,6 +165,7 @@ class DefaultTheme implements ITheme {
'--color-info-rgb' => join(',', $this->util->hexToRGB($colorInfo)),
'--color-info-hover' => $this->util->mix($colorInfo, $colorMainBackground, 80),
'--color-info-text' => $this->util->darken($colorInfo, 4),
'--color-favorite' => '#A37200',
// used for the icon loading animation
'--color-loading-light' => '#cccccc',

View file

@ -110,6 +110,8 @@ class HighContrastTheme extends DefaultTheme implements ITheme {
'--color-success-hover' => $this->util->darken($colorSuccess, 7),
'--color-success-text' => $this->util->darken($colorSuccess, 14),
'--color-favorite' => '#936B06',
'--color-scrollbar' => $this->util->darken($colorMainBackground, 25),
// used for the icon loading animation

View file

@ -64,6 +64,7 @@ class AccessibleThemeTestCase extends TestCase {
'--color-info-hover',
'--color-success',
'--color-success-hover',
'--color-favorite',
],
[
'--color-main-background',

View file

@ -590,7 +590,7 @@ export default {
// Set color to primary element for current / active favorite address
.favorite-color {
color: #a08b00;
color: var(--color-favorite);
}
.weather-status-menu-item__subheader {

4
dist/files-main.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long