Skip to content
Closed
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
41 changes: 32 additions & 9 deletions src/components/Dropdown/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,26 @@
width: 100%;
height: 100%;
cursor: pointer;
display: flex;
align-items: center;
gap: var(--spacing-xs);
padding: 0 var(--spacing-xs);
@media (hover: hover) and (pointer: fine) {
&:hover {
border: 1px solid var(--accent-color);
background-color: var(--accent-type-color);
color: var(--accent-color);
}
}

.iconTop,
.chevron {
position: static;
}

.chevron {
margin-left: auto;
}
}

.options {
Expand All @@ -37,17 +50,23 @@
}

.option {
padding-left: 0;
padding: 7px 0;
cursor: pointer;
position: relative;
display: flex;
align-items: center;
gap: var(--spacing-xs);
padding: var(--spacing-xs);

.icon {
position: static;
}

button {
width: 100%;
height: 100%;
flex: 1;
text-align: left;
background: none;
border: none;
cursor: pointer;
padding: 0;
}
}

Expand Down Expand Up @@ -117,16 +136,20 @@ button.chevron {
.selected > span,
.option > button > span {
text-align: left;
padding-left: 44px;
// 38px padding-right holds the chevron icon on mobile for better touch targets
padding-right: 38px;
display: inline-block;
width: 100%;
// 0.75rem font-size for mobile to fit content in smaller screens
font-size: 0.75rem;

@media (min-width: variables.$breakpoint-tablet) {
font-size: 1rem;
padding-right: 10px;
}
}

.selected > span {
flex: 1;
}

.option > button > span {
padding-right: var(--spacing-sm);
}