Skip to content

Commit db05345

Browse files
authored
fix: _article.scss — adjust non-scrolling code block (#328)
fix: `_article.scss` — adjust non-scrolling code block
2 parents 60d4234 + 6ffd706 commit db05345

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

src/assets/scss/pages/_article.scss

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,26 @@
185185
samp {
186186
display: inline-block;
187187
align-items: center;
188-
background-color: var(--clr-black);
188+
background-color: hsl(var(--_hs) 10%);
189189
color: var(--clr-white);
190190
padding: 0.2em 0.4em;
191191
border-radius: 0.3em;
192192
}
193193

194+
pre {
195+
@include mix.breakpoint-down("small") {
196+
&::after {
197+
content: "";
198+
position: absolute;
199+
right: 0;
200+
top: 0;
201+
bottom: 0;
202+
background: linear-gradient(90deg, transparent, hsl(var(--_hs) 6%));
203+
width: 2em;
204+
}
205+
}
206+
}
207+
194208
a {
195209
--_normal-color: var(--clr-accent-light);
196210
--_hover-color: var(--clr-white);
@@ -236,7 +250,7 @@
236250

237251
pre {
238252
border: 0.1rem solid var(--_background);
239-
background-color: hsl(0, 3%, 12%);
253+
background-color: hsl(var(--_hs) 10%);
240254
border-radius: 0.5rem;
241255
padding: 1rem;
242256
white-space: pre;
@@ -319,12 +333,16 @@
319333
code {
320334
color: var(--clr-white);
321335
box-shadow: none;
322-
background-color: transparent;
336+
width: 100%;
323337

324338
.hljs-comment,
325339
.hljs-meta {
326340
color: hsl(230, 100%, 89%, 0.9)
327341
}
342+
343+
@include mix.breakpoint-down('small') {
344+
overflow-x: auto;
345+
}
328346
}
329347
}
330348

0 commit comments

Comments
 (0)