Skip to content

Commit c4acc55

Browse files
committed
SkipToContent not fixed
1 parent 6dc9a6b commit c4acc55

File tree

2 files changed

+44
-42
lines changed

2 files changed

+44
-42
lines changed

src/frontend/apps/impress/src/components/SkipToContent.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ export const SkipToContent = () => {
4848
style={{
4949
opacity: isVisible ? 1 : 0,
5050
pointerEvents: isVisible ? 'auto' : 'none',
51-
transition: 'opacity 0.3s ease-in-out',
52-
position: 'fixed',
53-
top: 'var(--c--theme--spacings--2xs)',
51+
// transition: 'opacity 0.3s ease-in-out',
52+
//position: 'fixed',
53+
//top: 'var(--c--theme--spacings--2xs)',
5454
// padding header + logo(32px) + gap(3xs≈4px) + text "Docs"(≈70px) + 12px
55-
left: 'calc(var(--c--theme--spacings--base) + 32px + var(--c--theme--spacings--3xs) + 70px + 12px)',
56-
zIndex: 9999,
57-
whiteSpace: 'nowrap',
55+
// left: 'calc(var(--c--theme--spacings--base) + 32px + var(--c--theme--spacings--3xs) + 70px + 12px)',
56+
// zIndex: 9999,
57+
// whiteSpace: 'nowrap',
5858
}}
5959
>
6060
{t('Go to content')}

src/frontend/apps/impress/src/features/header/components/Header.tsx

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export const Header = () => {
2525

2626
return (
2727
<>
28-
<SkipToContent />
2928
<Box
3029
as="header"
3130
role="banner"
@@ -46,42 +45,45 @@ export const Header = () => {
4645
className="--docs--header"
4746
>
4847
{!isDesktop && <ButtonTogglePanel />}
49-
<StyledLink
50-
href="/"
51-
data-testid="header-logo-link"
52-
aria-label={t('Back to homepage')}
53-
$css={css`
54-
outline: none;
55-
&:focus-visible {
56-
box-shadow: 0 0 0 2px var(--c--theme--colors--primary-400) !important;
57-
border-radius: 4px;
58-
}
59-
`}
60-
>
61-
<Box
62-
$align="center"
63-
$gap={spacingsTokens['3xs']}
64-
$direction="row"
65-
$position="relative"
66-
$height="fit-content"
67-
$margin={{ top: 'auto' }}
48+
<Box $direction="row" $align="center" $gap="2rem">
49+
<StyledLink
50+
href="/"
51+
data-testid="header-logo-link"
52+
aria-label={t('Back to homepage')}
53+
$css={css`
54+
outline: none;
55+
&:focus-visible {
56+
box-shadow: 0 0 0 2px var(--c--theme--colors--primary-400) !important;
57+
border-radius: 4px;
58+
}
59+
`}
6860
>
69-
<Image
70-
className="c__image-system-filter"
71-
data-testid="header-icon-docs"
72-
src={logo?.src || '/assets/icon-docs.svg'}
73-
alt=""
74-
width={0}
75-
height={0}
76-
style={{
77-
width: logo?.width || 32,
78-
height: logo?.height || 'auto',
79-
}}
80-
priority
81-
/>
82-
<Title headingLevel="h1" aria-hidden="true" />
83-
</Box>
84-
</StyledLink>
61+
<Box
62+
$align="center"
63+
$gap={spacingsTokens['3xs']}
64+
$direction="row"
65+
$position="relative"
66+
$height="fit-content"
67+
$margin={{ top: 'auto' }}
68+
>
69+
<Image
70+
className="c__image-system-filter"
71+
data-testid="header-icon-docs"
72+
src={logo?.src || '/assets/icon-docs.svg'}
73+
alt=""
74+
width={0}
75+
height={0}
76+
style={{
77+
width: logo?.width || 32,
78+
height: logo?.height || 'auto',
79+
}}
80+
priority
81+
/>
82+
<Title headingLevel="h1" aria-hidden="true" />
83+
</Box>
84+
</StyledLink>
85+
<SkipToContent />
86+
</Box>
8587
{!isDesktop ? (
8688
<Box $direction="row" $gap={spacingsTokens['sm']}>
8789
<LaGaufre />

0 commit comments

Comments
 (0)