Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cell hover styles #2198

Merged
merged 4 commits into from
Aug 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 39 additions & 17 deletions webview/src/experiments/components/table/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,23 @@ $workspace-row-edge-margin: $edge-padding - $cell-padding;
}

.unselectedExperiment:not(.rowSelected):hover & {
background-color: $row-hover-background-color;
}

.unselectedExperiment:not(.rowSelected) .experimentCell:hover & {
background-color: $cell-hover-background-color;
background-image: linear-gradient(
$row-hover-background-color,
$row-hover-background-color
),
linear-gradient($bg-color, $bg-color);
}

.workspaceWithChanges.unselectedExperiment & {
border: 1px solid $changed-color;
}

.rowSelected.unselectedExperiment & {
background-color: $row-bg-selected-color;
background-image: linear-gradient(
$row-bg-selected-color,
$row-bg-selected-color
),
linear-gradient($bg-color, $bg-color);
}

.queuedExperiment & {
Expand All @@ -161,24 +165,26 @@ $workspace-row-edge-margin: $edge-padding - $cell-padding;
}

.runningExperiment:not(.rowSelected):hover & {
background-color: $row-hover-background-color;
background-image: linear-gradient(
$row-hover-background-color,
$row-hover-background-color
),
linear-gradient($bg-color, $bg-color);
border-left-color: $row-hover-background-color;
border-bottom-color: $row-hover-background-color;
}

.runningExperiment:not(.rowSelected) .experimentCell:hover & {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High contrast light theme

image

Dive bar:

image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured out a way to fix the background, though the spinners border are still a slight different color. You can't really notice unless you squint, so should be good to merge :)

image

background-color: $cell-hover-background-color;
border-left-color: $cell-hover-background-color;
border-bottom-color: $cell-hover-background-color;
}

.workspaceWithChanges.runningExperiment & {
border-right-color: $changed-color;
border-top-color: $changed-color;
}

.rowSelected.runningExperiment & {
background-color: $row-bg-selected-color;
background-image: linear-gradient(
$row-bg-selected-color,
$row-bg-selected-color
),
linear-gradient($bg-color, $bg-color);
border-left-color: $row-bg-selected-color;
border-bottom-color: $row-bg-selected-color;
}
Expand Down Expand Up @@ -289,9 +295,17 @@ $workspace-row-edge-margin: $edge-padding - $cell-padding;
background-color: $row-hover-background-color;
}

.td:hover:not(.experimentCell),
.experimentCell:hover:before {
background-color: $cell-hover-background-color;
.td:hover {
border-right-color: $border-color;
border-left-color: $border-color;

&:first-child:before {
border-right-color: $border-color;
}

&:last-child {
border-right-color: transparent;
}
}
}

Expand Down Expand Up @@ -444,6 +458,8 @@ $workspace-row-edge-margin: $edge-padding - $cell-padding;
font-size: 0.8rem;
line-height: 2rem;
align-items: center;
border-right: 1px solid transparent;
border-left: 1px solid transparent;

&:first-child {
.innerCell {
Expand All @@ -461,6 +477,12 @@ $workspace-row-edge-margin: $edge-padding - $cell-padding;
display: flex;
flex-flow: row nowrap;
text-align: left;
border-right: none;
border-left: none;

&:before {
border-right: 1px solid transparent;
}

.innerCell {
justify-content: flex-start;
Expand Down
1 change: 0 additions & 1 deletion webview/src/shared/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ $meta-cell-color: var(--vscode-descriptionForeground);

$hover-background-color: var(--vscode-list-hoverBackground);
$row-hover-background-color: var(--vscode-list-hoverBackground);
$cell-hover-background-color: var(--vscode-dropdown-background);

$accent-color: var(--button-primary-background);

Expand Down