Skip to content

Commit 057351e

Browse files
authored
move permalinks to right on mobile - fixes #166 (#169)
1 parent 234af76 commit 057351e

File tree

1 file changed

+13
-15
lines changed
  • packages/site-kit/src/lib/styles

1 file changed

+13
-15
lines changed

packages/site-kit/src/lib/styles/text.css

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.text :where(h2) {
22
margin-top: 7rem;
3-
border-bottom: 1px solid var(--sk-back-4);
43
}
54

65
.text :where(h3) {
@@ -224,26 +223,25 @@
224223
background-size: 1em 1em;
225224
width: 1.4em;
226225
height: 1em;
227-
left: -1.3em;
228-
opacity: 0;
229-
transition: opacity 0.2s;
230226
bottom: 0.25em;
231-
}
232227

233-
@media (min-width: 768px) {
234-
.text :where(a.permalink:focus),
235-
.text :where(h2, h3, h4, h5, h6):hover a.permalink {
236-
opacity: 1;
228+
@media (max-width: 767px) {
229+
right: 0;
230+
scale: 0.8;
237231
}
238-
}
239232

240-
@media (max-width: 768px) {
241-
.text :where(a.permalink) {
242-
transform: scale(0.6);
243-
opacity: 1;
244-
left: -1em;
233+
@media (min-width: 768px) {
234+
left: -1.3em;
235+
opacity: 0;
236+
transition: opacity 0.2s;
237+
238+
:where(h2, h3, h4, h5, h6):hover & {
239+
opacity: 1;
240+
}
245241
}
242+
}
246243

244+
@media (max-width: 768px) {
247245
.text :where(blockquote *) {
248246
word-break: break-word;
249247
}

0 commit comments

Comments
 (0)