Skip to content

Commit f1ca68f

Browse files
committed
fix(UI): Use default background color for selected text and misc dark/light color fixes
1 parent 29d3689 commit f1ca68f

File tree

7 files changed

+20
-31
lines changed

7 files changed

+20
-31
lines changed

skore-ui/src/assets/styles/_variables.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ body[data-vscode-theme-kind="vscode-dark"],
7575

7676
/* shadow */
7777
--color-shadow: rgb(0 0 0/58%);
78+
79+
/* images */
80+
--image-not-found: url("../images/not-found-dark.png");
81+
--image-editor-placeholder: url("../images/editor-placeholder-dark.svg");
82+
--image-activity-feed-placeholder: url("../images/activity-feed-placeholder-dark.svg");
7883
}
7984

8085
body[data-jp-theme-light="true"],
@@ -108,4 +113,9 @@ body[data-vscode-theme-kind="vscode-light"],
108113

109114
/* shadow */
110115
--color-shadow: rgb(0 0 0/19%);
116+
117+
/* images */
118+
--image-not-found: url("../images/not-found-light.png");
119+
--image-editor-placeholder: url("../images/editor-placeholder-light.svg");
120+
--image-activity-feed-placeholder: url("../images/activity-feed-placeholder-light.svg");
111121
}

skore-ui/src/components/DropdownButtonItem.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ const props = withDefaults(defineProps<DropdownItemProps>(), { iconPosition: "le
3434
border: 0;
3535
border-bottom: 1px solid var(--color-stroke-background-primary);
3636
background-color: var(--color-background-primary);
37+
color: var(--color-text-primary);
3738
cursor: pointer;
3839
text-align: left;
3940
white-space: nowrap;

skore-ui/src/components/EditableListItem.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,8 @@ onMounted(() => {
128128
transition: font-weight var(--animation-duration) var(--animation-easing);
129129
130130
&[contenteditable="true"] {
131-
background-color: var(--color-background-branding);
132-
caret-color: var(--color-text-button-primary);
133-
color: var(--color-text-button-primary);
131+
caret-color: var(--color-text-branding);
132+
color: var(--color-text-primary);
134133
cursor: text;
135134
}
136135
}

skore-ui/src/components/ProjectViewCard.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ onBeforeUnmount(() => {
116116
& .titles {
117117
position: relative;
118118
padding-left: calc(var(--spacing-8) + 4px);
119+
color: var(--color-text-primary);
119120
120121
& .title {
121122
font-size: var(--font-size-sm);

skore-ui/src/components/TreeAccordionItem.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ onMounted(() => {
148148
align-items: center;
149149
justify-content: space-between;
150150
background-color: var(--color-background-primary);
151+
color: var(--color-text-primary);
151152
152153
.label {
153154
display: flex;
@@ -191,12 +192,13 @@ onMounted(() => {
191192
border: none;
192193
margin: 0;
193194
background-color: transparent;
195+
color: var(--color-text-secondary);
194196
cursor: pointer;
195197
font-size: var(--font-size-md);
196198
transition: color var(--animation-duration) var(--animation-easing);
197199
198200
&:hover {
199-
color: var(--color-primary);
201+
color: var(--color-text-primary);
200202
}
201203
}
202204
}

skore-ui/src/views/activity/ActivityFeedView.vue

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ onBeforeUnmount(() => {
129129
130130
& .inner {
131131
padding-top: 189px;
132+
background-image: var(--image-activity-feed-placeholder);
132133
background-position: center;
133134
background-repeat: no-repeat;
134135
background-size: 189px 180px;
@@ -140,16 +141,4 @@ onBeforeUnmount(() => {
140141
}
141142
}
142143
}
143-
144-
@media (prefers-color-scheme: light) {
145-
.activity-feed .placeholder .inner {
146-
background-image: url("../../assets/images/activity-feed-placeholder-light.svg");
147-
}
148-
}
149-
150-
@media (prefers-color-scheme: dark) {
151-
.activity-feed .placeholder .inner {
152-
background-image: url("../../assets/images/activity-feed-placeholder-dark.svg");
153-
}
154-
}
155144
</style>

skore-ui/src/views/project/ProjectView.vue

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,6 @@ onBeforeUnmount(() => {
122122
</template>
123123

124124
<style scoped>
125-
@media (prefers-color-scheme: dark) {
126-
main {
127-
--not-found-image: url("../../assets/images/not-found-dark.png");
128-
--editor-placeholder-image: url("../../assets/images/editor-placeholder-dark.svg");
129-
}
130-
}
131-
132-
@media (prefers-color-scheme: light) {
133-
main {
134-
--not-found-image: url("../../assets/images/not-found-light.png");
135-
--editor-placeholder-image: url("../../assets/images/editor-placeholder-light.svg");
136-
}
137-
}
138-
139125
main {
140126
display: flex;
141127
overflow: hidden;
@@ -204,11 +190,12 @@ main {
204190
flex-direction: column;
205191
justify-content: center;
206192
background-color: var(--color-background-primary);
193+
color: var(--color-text-secondary);
207194
208195
& .wrapper {
209196
padding-top: 225px;
210197
margin: var(--spacing-24);
211-
background-image: var(--editor-placeholder-image);
198+
background-image: var(--image-editor-placeholder);
212199
background-position: 50% 0;
213200
background-repeat: no-repeat;
214201
background-size: 265px 192px;

0 commit comments

Comments
 (0)