Skip to content

Commit

Permalink
Merge pull request #3674 from relative-ci/enhance-dropdowns
Browse files Browse the repository at this point in the history
enhance dropdowns
  • Loading branch information
vio authored Aug 6, 2023
2 parents db1ec0a + 3a1ca87 commit 88e7f77
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/ui/src/ui/dropdown/dropdown.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
text-decoration: none;
}

.item + .item {
margin-top: calc(var(--space-xxxsmall) / 2);
}

.item[data-active-item],
.item:hover,
.item:focus,
Expand Down
33 changes: 28 additions & 5 deletions packages/ui/src/ui/filters/filters.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,43 @@
}

.filterOnlyButton {
padding: var(--space-xxxsmall);
padding: calc(var(--space-xxxsmall) / 2 - 1px) var(--space-xxxsmall);
display: none;
appearance: none;
border: none;
background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--color-highlight) 30%);
border-radius: var(--radius-small);
cursor: pointer;
position: absolute;
right: 0;
top: 0;
bottom: 0;
right: 1px;
top: 1px;
bottom: 1px;
transition: var(--transition-in);
background: var(--color-info);
color: var(--color-background);
font-size: var(--size-small);
line-height: var(--space-xsmall);
}

.filterOnlyButton:hover,
.filterOnlyButton:active,
.filterOnlyButton:focus {
transition: var(--transition-out);
background: var(--color-info-dark);
color: var(--color-background);
}

/** cover item text */
.filterOnlyButton::before {
content: ' ';
display: block;
position: absolute;
top: 0;
right: 100%;
bottom: 0;
width: var(--space-medium);
background: linear-gradient(90deg, rgba(255, 255, 255, 0), var(--color-highlight) 75%);
}

/** filter disabled state */
.filterInput[disabled] + .filterLabel {
color: var(--color-text-light);
Expand Down

0 comments on commit 88e7f77

Please sign in to comment.