Skip to content

Commit b9ca306

Browse files
committed
Improve bookmarks position on mobile
Enlarge the horizontal content padding to provide more room for the bookmarks on smaller viewports. On smaller viewports show the bookmarks inside the boundaries of the browser viewport (to avoid horizontal scrolling). Provide different position to bookmarks inside blockquote elements because the blockquote have relative position which affects the bookmark positioning.
1 parent 17b57ee commit b9ca306

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

html/css/ejs.css

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ body {
2828
article {
2929
margin: 0 auto;
3030
max-width: 35em;
31-
padding: 2em 0.75em 5em 0.75em;
31+
padding: 2em 1em 5em;
3232
position: relative;
3333
}
3434

@@ -68,6 +68,16 @@ p:hover a.p_ident:after, pre:hover a.c_ident:after, h2:hover a.h_ident:after, h3
6868
right: -25px;
6969
}
7070

71+
@media screen and (max-width: 800px) {
72+
p:hover a.p_ident:after, pre:hover a.c_ident:after, h2:hover a.h_ident:after, h3:hover a.h_ident:after {
73+
right: 5px;
74+
}
75+
76+
blockquote p:hover a.p_ident:after {
77+
right: -15px;
78+
}
79+
}
80+
7181

7282
code, pre, .CodeMirror {
7383
font-size: 18px;
@@ -100,6 +110,13 @@ pre.cm-s-default, p, h2, h3 {
100110
padding-right: 30px;
101111
}
102112

113+
@media screen and (max-width: 800px) {
114+
pre.cm-s-default, p, h2, h3 {
115+
margin-right: 0;
116+
padding-right: 0;
117+
}
118+
}
119+
103120
a, a:visited, a:active {
104121
text-decoration: none;
105122
color: #467;

0 commit comments

Comments
 (0)