Skip to content

Commit

Permalink
Fix some issues in the dark mode by using correct primer variables
Browse files Browse the repository at this point in the history
  • Loading branch information
HDinger authored and oliverguenther committed Jun 24, 2024
1 parent 883f657 commit dceff13
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 13 deletions.
3 changes: 3 additions & 0 deletions app/views/custom_styles/_primer_color_mapping.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
--button-primary-bgColor-hover: var(--button--primary-background-hover-color) !important;
--button-primary-bgColor-disabled: var(--button--primary-background-disabled-color) !important;
--button-primary-borderColor-disabled: var(--button--primary-border-disabled-color) !important;
--fc-page-bg-color: var(--body-background) !important;
--fc-list-event-hover-bg-color: var(--control-transparent-bgColor-hover) !important;
}

/* Generic color mapping for content variables */
Expand Down Expand Up @@ -79,6 +81,7 @@
/* For dark themes we are using a lighter version of the accent and primary color. Otherwise they will not be seen */
[data-dark-theme=dark] {
--accent-color: var(--accent-color--dark-mode);
--content-icon-color: var(--accent-color--dark-mode);
--primary-button-color: var(--primary-button-color--dark-mode);
--main-menu-bg-color: var(--overlay-bgColor);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
display: grid
grid-template-rows: 32px 1fr
grid-row-gap: 10px
background: #F3F3F3
background: var(--data-gray-color-muted)
padding: 8px
border: 1px solid var(--borderColor-default)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ $op-team-planner-resource-width: 180px

&--remove-dropzone
flex: 1
border: 1px dashed #1A67A3
border: 1px dashed var(--display-blue-bgColor-emphasis)
box-sizing: border-box
height: 2.25rem

Expand All @@ -62,7 +62,7 @@ $op-team-planner-resource-width: 180px
justify-content: center

&_active
background: #D1E5F5
background: var(--display-blue-bgColor-muted)

&_forbidden
border-color: var(--content-form-danger-zone-bg-color)
Expand All @@ -72,12 +72,12 @@ $op-team-planner-resource-width: 180px


&--dropzone-label
color: #1A67A3
color: var(--display-blue-fgColor)

&--no-data
min-height: 250px
padding: 2rem
background-color: #F3F3F3
background-color: var(--data-gray-color-muted)
display: flex
flex-direction: column
justify-content: center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

&--error
@include spot-caption
color: $spot-color-danger-dark
color: var(--control-borderColor-danger)
margin-bottom: $spot-spacing-0_25

&--label,
Expand Down
1 change: 1 addition & 0 deletions frontend/src/global_styles/content/_activity_list.sass
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

&-title
@include spot-body-small (bold)
color: var(--body-font-color)

&-subtitle
@include spot-caption
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/global_styles/content/_autocomplete.sass
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ div.autocomplete
color: var(--body-font-color) !important
border-color: var(--borderColor-default) !important

.ng-select-container
background-color: transparent !important

.ng-select .ng-arrow-wrapper .ng-arrow
border-color: var(--fgColor-muted) transparent transparent

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/global_styles/content/_grid.sass
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ body.widget-grid-layout

.grid--widget-add
padding: 15px
background-color: var(--gray)
background-color: var(--bgColor-neutral-emphasis)
border-radius: 50%
opacity: 0

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/global_styles/content/_hide_section.sass
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ section.hide-section
flex-wrap: nowrap
padding: 0.5rem 0
&:hover
background-color: #f8f8f8
background-color: var(--control-transparent-bgColor-hover)

.form--field-container
flex-shrink: 1
Expand Down
5 changes: 2 additions & 3 deletions frontend/src/global_styles/openproject/_forms.sass
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,10 @@ $input-border-focus: 1px solid #999 !default

// Labels
$form-label-margin: 0.5rem !default
$form-label-color: #333 !default

// Inline labels
$inlinelabel-color: #333 !default
$inlinelabel-background: #eee !default
$inlinelabel-color: var(--button--font-color) !default
$inlinelabel-background: var(--button--background-color) !default
$inlinelabel-border: $input-border !default

// Select menus
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@
--user-avatar-border-radius: 50%;
--inplace-edit--border-color: #ddd;
--inplace-edit--color--very-dark: #cacaca;
--inplace-edit--color--disabled: #4d4d4d;
--inplace-edit--bg-color--disabled: #eee;
--inplace-edit--color--disabled: var(--control-fgColor-disabled);
--inplace-edit--bg-color--disabled: var(--control-bgColor-disabled);
--table-border-color: #E7E7E7;
--table-row-highlighting-outline-color: #00A6FF;
--button--font-color: #222222;
Expand Down

0 comments on commit dceff13

Please sign in to comment.