Skip to content

Commit

Permalink
fix: dark mode improvements (#462)
Browse files Browse the repository at this point in the history
Signed-off-by: Rafal Pelczar <[email protected]>
  • Loading branch information
rpelczar authored Oct 11, 2023
1 parent 76fa7c1 commit 554c620
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 9 deletions.
27 changes: 25 additions & 2 deletions src/components/popup/popup.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '../../styles/config';
@import '../../styles/theme';

$popup-border-radius: 8px;

Expand All @@ -9,12 +10,17 @@ $popup-border-radius: 8px;
width: 100%;
height: 100%;
z-index: 200;
// Just in case the theme class is not added
background-color: rgba(222, 222, 222, 0.62); /*dim the background*/
border: 1px solid $argo-color-gray-4;
@include themify($themes) {
background-color: themed('overlay');
}

.popup-container {
position: relative;
box-shadow: 3px 3px 20px #888888;
@include themify($themes) {
box-shadow: 3px 3px 20px themed('shadow');
}
margin: 0 auto;
top: 50%;
transform: translateY(-50%);
Expand Down Expand Up @@ -47,7 +53,11 @@ $popup-border-radius: 8px;
}

&__normal {
// Just in case the theme class is not added
background-color: $argo-color-gray-2;
@include themify($themes) {
background-color: themed('light-argo-gray-2');
}
}

&__red {
Expand All @@ -61,7 +71,11 @@ $popup-border-radius: 8px;
}

&__footer {
// Just in case the theme class is not added
background-color: $argo-color-gray-1;
@include themify($themes) {
background-color: themed('background-2');
}
bottom: 0;
padding-top: 20px;
padding-left: 30px;
Expand All @@ -80,7 +94,11 @@ $popup-border-radius: 8px;
}

&__body {
// Just in case the theme class is not added
background-color: $argo-color-gray-1;
@include themify($themes) {
background-color: themed('background-2');
}

&__hasNoIcon {
padding-left: 30px;
Expand All @@ -101,7 +119,12 @@ $popup-border-radius: 8px;
font-size: 15px;
margin-top: 10px;
margin-bottom: 10px;
// Just in case the theme class is not added
color: $argo-color-gray-6;

@include themify($themes) {
color: themed('light-argo-gray-6');
}
}
}

Expand Down
5 changes: 4 additions & 1 deletion src/components/select/select.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '../../styles/config';
@import '../../styles/theme';

.select {
position: relative;
Expand All @@ -15,12 +16,14 @@
position: relative;
padding: 8px 20px 8px 0;
font-size: 15px;
border-bottom: 2px solid #ccc;
transition: border .2s;
cursor: pointer;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@include themify($themes) {
border-bottom: 2px solid themed('border');;
}
}

&__value-arrow {
Expand Down
2 changes: 1 addition & 1 deletion src/components/sliding-panel/sliding-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ $sliding-panel-middle-width: 600px;
color: $argo-color-gray-5;
@include themify($themes) {
background-color: themed('light-argo-gray-2');
border-bottom: 1px solid themed('border');
}
border-bottom: 1px solid #c6cfd1;
font-weight: 500;
font-size: .925em;

Expand Down
4 changes: 4 additions & 0 deletions src/components/tabs/tabs.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
box-shadow: none;
border-bottom: 1px solid $argo-color-gray-4;

.theme-dark & {
border-color: $argo-color-gray-7;
}

a {
color: $argo-color-teal-5;

Expand Down
6 changes: 5 additions & 1 deletion src/components/top-bar/top-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
.top-bar {
line-height: $top-bar-height;
@include themify($themes) {
background: themed('background-2');
background: themed('background-2');
}
transition: right .5s;
border-bottom: 1px solid $argo-color-gray-2;

.theme-dark & {
border-color: $argo-color-gray-7;
}

&__left-side {
padding-left: 20px;
white-space: nowrap;
Expand Down
5 changes: 4 additions & 1 deletion src/styles/elements/containers.scss
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,15 @@
color: themed('text-2');
}
.columns {
border-bottom: 1px solid $argo-color-gray-3;
padding: 0;
vertical-align: middle;
line-height: 50px;
overflow-wrap: break-word;

@include themify($themes) {
border-bottom: 1px solid themed('border');
}

&--narrower-height {
line-height: 20px;
padding: 14px 0;
Expand Down
2 changes: 1 addition & 1 deletion src/styles/elements/form-controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@
background-color: transparent;
@include themify($themes) {
color: themed('text-2');
border-bottom: 2px solid themed('border');;
}
border: 0;
border-bottom: 2px solid #ccc;
transition: border .2s;

.error & {
Expand Down
9 changes: 7 additions & 2 deletions src/styles/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ $themes: (
light-argo-teal-7: $argo-color-teal-7,
light-argo-teal-5: $argo-color-teal-5,
pod-cyan: lightcyan,
layout-loader-bg: rgba($argo-color-gray-7, 0.4),
layout-loader-bg: rgba($argo-color-gray-7, 0.4),
overlay: rgba(222, 222, 222, 0.62),
shadow: $argo-color-gray-5,
border: $argo-color-gray-3
),
dark: (
background-1: $dark-theme-background-1,
Expand All @@ -26,7 +29,9 @@ $themes: (
light-argo-teal-5: $argo-color-teal-4,
pod-cyan: $argo-color-teal-8,
layout-loader-bg: rgba($argo-color-gray-3, 0.4),

overlay: rgba(70, 70, 70, 0.62),
shadow: $dark-theme-background-1,
border: $argo-color-gray-7
)
);

Expand Down

0 comments on commit 554c620

Please sign in to comment.