Skip to content
Draft
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
3 changes: 2 additions & 1 deletion packages/craftcms-ui/src/styles/cp.css
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@
}

.skip-link--global {
--x-position: calc(10rem / 16);
--x-position: calc(5rem / 16);
--y-position: calc(5rem / 16);
z-index: calc(var(--global-sidebar-z-index) + 1);
}

.error-list {
Expand Down
1 change: 1 addition & 0 deletions resources/css/cp.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ CP Styles
);
--global-content-width: calc(1440rem / 16);
--header-height: calc(44rem / 16);
--global-sidebar-z-index: 10;

/* Workspace */
--workspace-bg-color: var(--c-color-neutral-fill-quiet);
Expand Down
2 changes: 1 addition & 1 deletion resources/js/common/components/CpSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
— but below modals (10001+). The sidebar is chrome: a floating drawer
overlays the page, and a collapsed rail's label tooltips overflow across
it. Both get sliced by a sticky header otherwise. */
z-index: 10;
z-index: var(--global-sidebar-z-index);
height: 100dvh;
width: var(--global-sidebar-width);
display: flex;
Expand Down
20 changes: 10 additions & 10 deletions resources/js/common/layouts/screens/PageScreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,16 @@
<Head :title="pageTitle" />
<LiveRegion />
<div class="cp">
<!-- Focus lands here on Inertia navigation; see
`handleAccessibleRouting` in bootstrap/cp.ts. -->
<span id="route-focus-anchor" tabindex="-1" class="sr-only"></span>
<a
v-for="link in skipLinks"
:key="link.url"
:href="link.url"
class="skip-link skip-link--global"
>{{ link.label }}</a
>
<div class="cp__sidebar">
<!-- No props: the sidebar reads the shared store directly, and renders
the toggle that writes to it. -->
Expand All @@ -228,16 +238,6 @@
<div class="cp__main">
<div class="cp__header">
<header>
<!-- Focus lands here on Inertia navigation; see
`handleAccessibleRouting` in bootstrap/cp.ts. -->
<span id="route-focus-anchor" tabindex="-1" class="sr-only"></span>
<a
v-for="link in skipLinks"
:key="link.url"
:href="link.url"
class="skip-link skip-link--global"
>{{ link.label }}</a
>
<div class="container">
<div class="flex gap-4 py-1 items-center justify-between">
<craft-button
Expand Down
Loading