Skip to content

Commit

Permalink
Merge pull request #974 from logto-io/charles-log-10714-improve-layou…
Browse files Browse the repository at this point in the history
…t-responsiveness

refactor: improve tutorial selection dropdown styles
  • Loading branch information
charIeszhao authored Jan 20, 2025
2 parents 49e747d + 43809e0 commit 61e837b
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
22 changes: 22 additions & 0 deletions src/theme/BlogPostItem/Header/SelectionDropdown/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@
.dropdown {
position: absolute;
min-width: 650px;
max-height: 70vh;
padding: 28px 24px;
background: #fff;
border-radius: 8px;
box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 20%);
overflow-y: auto;

label {
display: block;
Expand Down Expand Up @@ -74,4 +76,24 @@ html[data-theme='dark'] {
.dropdown {
background: var(--logto-container-neutral-bg);
}
}

@media (max-width: 996px) {
.dropdown {
min-width: 500px;
}

.dropdownGroup {
grid-template-columns: repeat(2, 1fr);
}
}

@media (max-width: 600px) {
.dropdown {
min-width: 250px;
}

.dropdownGroup {
grid-template-columns: repeat(1, 1fr);
}
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
.dropdownAnchor {
padding-inline: 2px 0;
outline: 2px solid transparent;
outline-offset: -2px;
border-radius: 12px;
cursor: pointer;

&:hover {
background: var(--logto-overlay-brand-hover);
}

&::after {
content: '';
display: inline-block;
width: 24px;
height: 24px;
margin-inline-start: 4px;
background: var(--ifm-menu-link-sublist-icon) no-repeat 50% / 24px 24px;
width: 28px;
height: 28px;
margin-inline-start: 2px;
background: var(--ifm-menu-link-sublist-icon) no-repeat 50% / 28px 28px;
transform: rotate(180deg);
}

Expand Down

0 comments on commit 61e837b

Please sign in to comment.