Skip to content

Commit

Permalink
Refined hover area for closed sidebar in Admin (#22004)
Browse files Browse the repository at this point in the history
ref
https://linear.app/ghost/issue/DES-797/admin-visual-design-improvements

- When the sidebar is closed in Admin, the hover area to re-open it is
too narrow. This PR updates the width of this area so it's easier to
target.
  • Loading branch information
peterzimon authored Jan 14, 2025
1 parent 8055c3d commit 6ca066c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/admin-x-settings/src/MainContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {useRouting} from '@tryghost/admin-x-framework/routing';

const Page: React.FC<{children: ReactNode}> = ({children}) => {
return <>
<div className='fixed right-0 top-2 z-50 flex justify-end p-8 dark:bg-grey-975 tablet:fixed tablet:top-0 tablet:bg-transparent tablet:px-8 dark:tablet:bg-transparent' id="done-button-container">
<div className='fixed right-0 top-2 z-50 flex justify-end bg-transparent p-8 tablet:fixed tablet:top-0 tablet:px-8' id="done-button-container">
<ExitSettingsButton />
</div>
<div className="w-full dark:bg-grey-975 tablet:fixed tablet:left-0 tablet:top-0 tablet:flex tablet:h-full" id="admin-x-settings-content">
Expand Down Expand Up @@ -77,7 +77,7 @@ const MainContent: React.FC = () => {
<Sidebar />
</div>
</div>
<div className="relative h-full flex-1 overflow-y-scroll bg-white pt-12 dark:bg-black tablet:basis-[800px]" id="admin-x-settings-scroller">
<div className="relative h-full flex-1 overflow-y-scroll bg-white pt-12 dark:bg-grey-975 tablet:basis-[800px] dark:tablet:bg-black" id="admin-x-settings-scroller">
<Settings />
</div>
</Page>
Expand Down
8 changes: 6 additions & 2 deletions ghost/admin/app/styles/layouts/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,11 @@ body:not(.gh-body-fullscreen) .gh-viewport {
opacity: 0;
}

.gh-nav-hidden .gh-toggle-nav-menu {
width: 60px;
right: -60px;
}

.gh-nav:hover .gh-toggle-nav-menu,
.gh-nav-hidden .gh-toggle-nav-menu {
opacity: 1;
Expand Down Expand Up @@ -1190,10 +1195,9 @@ body:not(.gh-body-fullscreen) .gh-viewport {
padding: 0 var(--main-layout-content-sidepadding) var(--main-layout-content-sidepadding);
margin: 0 auto;
max-width: var(--main-layout-content-maxwidth);
transition: padding ease-in-out 250ms;
}

.gh-nav.close + .gh-main .gh-canvas {
.gh-nav-hidden + .gh-main .gh-canvas {
padding-left: 80px;
padding-right: 80px;
}
Expand Down

0 comments on commit 6ca066c

Please sign in to comment.