Skip to content

Commit 8469752

Browse files
committed
chore: fixed "skip to main content" styling
1 parent ae1c80b commit 8469752

4 files changed

Lines changed: 28 additions & 3 deletions

File tree

layouts/announcements/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ define "main" }}
2-
<div class="container">
2+
<div class="container" id="main-content" tabindex="-1">
33
<h1>{{ .Title }}</h1>
44
{{ if .Description }}
55
<p>{{ .Description }}</p>

layouts/modules/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ define "main" }}
2-
<div class="container">
2+
<div class="container" id="main-content" tabindex="-1">
33
<h1>{{ .Title }}</h1>
44
{{ if .Description }}
55
<p>{{ .Description }}</p>

layouts/staffers/list.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{ define "main" }}
2-
<div class="container">
2+
<div class="container" id="main-content" tabindex="-1">
33
<h1>{{ .Title }}</h1>
44
{{ if .Description }}
55
<p>{{ .Description }}</p>

static/custom.css

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,31 @@
7070
--code-max-height: 60rem;
7171
}
7272

73+
/* "Skip to main content" link */
74+
75+
#gdoc-to-main {
76+
position: absolute;
77+
left: -10000px;
78+
top: auto;
79+
width: 1px;
80+
height: 1px;
81+
overflow: hidden;
82+
}
83+
84+
#gdoc-to-main:focus {
85+
position: absolute;
86+
left: 50%;
87+
transform: translateX(-50%);
88+
top: 1rem;
89+
width: auto;
90+
height: auto;
91+
padding: 0.5rem 1rem;
92+
background: var(--accent-color-lite, #f0f0f0);
93+
border: 1px solid var(--accent-color, #333);
94+
border-radius: 4px;
95+
z-index: 1000;
96+
}
97+
7398
/* =========================================================================
7499
Add Your Own Custom Styles Below
75100
========================================================================= */

0 commit comments

Comments
 (0)