Skip to content
Closed
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
24 changes: 12 additions & 12 deletions packages/edit-site/src/components/site-hub/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,20 +154,20 @@ const SiteHub = forwardRef( ( props, ref ) => {
} }
>
{ decodeEntities( siteTitle ) }
{ canvasMode === 'view' && (
<Button
href={ homeUrl }
target="_blank"
label={ __( 'View site' ) }
aria-label={ __(
'View site (opens in a new tab)'
) }
icon={ external }
className="edit-site-site-hub__site-view-link"
/>
) }
</motion.div>
</AnimatePresence>
{ canvasMode === 'view' && (
<Button
href={ homeUrl }
target="_blank"
label={ __( 'View site' ) }
aria-label={ __(
'View site (opens in a new tab)'
) }
icon={ external }
className="edit-site-site-hub__site-view-link"
/>
) }
</HStack>
{ canvasMode === 'view' && (
<Button
Expand Down
48 changes: 27 additions & 21 deletions packages/edit-site/src/components/site-hub/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,6 @@
.edit-site-site-hub__container {
gap: 0;
}

.edit-site-site-hub__site-view-link {
flex-grow: 0;
@include break-mobile() {
opacity: 0;
transition: opacity 0.2s ease-in-out;
}
&:focus {
outline: none;
box-shadow: none;
opacity: 1;
}
svg {
fill: $white;
}
}
&:hover {
.edit-site-site-hub__site-view-link {
opacity: 1;
}
}
}

.edit-site-site-hub__post-type {
Expand All @@ -53,8 +32,35 @@
}

.edit-site-site-hub__site-title {
display: flex;
align-items: center;
margin-left: $grid-unit-05;
gap: $grid-unit-05;
flex-grow: 1;

&:hover {
.edit-site-site-hub__site-view-link {
opacity: 1;
}
}
}

.edit-site-site-hub__site-view-link {
flex-grow: 0;
@include break-mobile() {
opacity: 0;
transition: opacity 0.1s ease-in-out;
}

&:focus {
outline: none;
box-shadow: none;
opacity: 1;
}

svg {
fill: $white;
}
}

.edit-site-site-hub_toggle-command-center {
Expand Down