Skip to content

Commit 0a066e8

Browse files
authored
fix #109 and #137, hopefully (#220)
* fix #109 and #137, hopefully * fix * fix * fixes * fix * tidy up
1 parent b667424 commit 0a066e8

File tree

4 files changed

+28
-8
lines changed

4 files changed

+28
-8
lines changed

apps/svelte.dev/src/routes/_home/common.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
.home {
66
--background-1: radial-gradient(circle at top right, rgb(230, 233, 236), rgb(244, 245, 247));
77
--background-2: var(--sk-theme-2);
8+
overflow-x: hidden;
89
}
910

1011
.home .grid {

apps/svelte.dev/src/routes/docs/[...path]/OnThisPage.svelte

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,12 @@
148148
149149
@media (min-width: 1200px) {
150150
position: fixed;
151+
display: flex;
152+
flex-direction: column;
151153
top: 14rem;
154+
height: calc(100vh - 14rem);
152155
left: calc(100dvw - var(--sidebar-width));
153156
width: var(--sidebar-width);
154-
padding: 0 var(--sk-page-padding-side) 0 0;
155157
box-sizing: border-box;
156158
157159
input {
@@ -170,6 +172,10 @@
170172
171173
nav {
172174
display: block;
175+
overflow-y: auto;
176+
scrollbar-width: none;
177+
margin-left: -1rem; /* negative margin avoids focus rings being cut off */
178+
padding: 0 0 var(--sk-page-padding-top) 1rem;
173179
174180
li:first-child {
175181
display: list-item;

packages/site-kit/src/lib/components/Shell.svelte

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ The main shell of the application. It provides a slot for the top navigation, th
7575
padding-top: var(--sk-nav-height);
7676
padding-bottom: var(--sk-banner-bottom-height);
7777
height: 100%;
78-
overflow-x: hidden;
7978
}
8079
8180
@media (max-width: 799px) {

packages/site-kit/src/lib/components/Text.svelte

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,19 @@
5353

5454
<style>
5555
.text :global {
56+
h2,
57+
h3 {
58+
max-width: 100%;
59+
text-overflow: ellipsis;
60+
overflow: hidden;
61+
padding: 0 1em 0 0;
62+
63+
@media (min-width: 768px) {
64+
margin: 0 0 0 -2em;
65+
padding: 0 1em 0 2em;
66+
}
67+
}
68+
5669
h2 {
5770
margin-top: 7rem;
5871
}
@@ -289,23 +302,24 @@
289302
a.permalink {
290303
position: absolute !important;
291304
display: block;
292-
background: url(../icons/link.svg) 0 50% no-repeat;
305+
background: url(../icons/link.svg) 50% 50% no-repeat;
293306
background-size: 1em 1em;
294-
width: 1.4em;
295-
height: 1.2em;
296-
top: 0;
307+
width: 1.2em;
308+
height: 0.8em;
309+
top: 0.2em;
297310
298311
@media (max-width: 767px) {
299312
right: 0;
300313
scale: 0.8;
301314
}
302315
303316
@media (min-width: 768px) {
304-
left: -1.3em;
317+
left: 0.7em;
305318
opacity: 0;
306319
transition: opacity 0.2s;
307320
308-
:where(h2, h3):hover & {
321+
:where(h2, h3):hover &,
322+
&:focus {
309323
opacity: 1;
310324
}
311325
}

0 commit comments

Comments
 (0)