68 lines
1011 B
CSS
68 lines
1011 B
CSS
.code {
|
|
counter-reset: line;
|
|
font-size: 1.2rem;
|
|
line-height: 2rem;
|
|
background-color: var(--article-bg);
|
|
border-radius: 4px;
|
|
padding: 1.5rem;
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.code::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 4px;
|
|
background: var(--accent-color);
|
|
}
|
|
|
|
.line {
|
|
position: relative;
|
|
padding-left: 2.5rem;
|
|
}
|
|
|
|
.line::before {
|
|
content: counter(line);
|
|
counter-increment: line;
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
margin-right: 1rem;
|
|
color: grey;
|
|
font-size: 0.9rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
.code a {
|
|
color: var(--accent-color);
|
|
text-decoration: none;
|
|
}
|
|
|
|
.code a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.className {
|
|
color: var(--accent-color);
|
|
}
|
|
|
|
@media screen and (max-width: 600px) {
|
|
.code {
|
|
font-size: 0.85rem;
|
|
line-height: 1.5rem;
|
|
padding: 1.25rem 1rem;
|
|
}
|
|
|
|
.line {
|
|
padding-left: 2rem;
|
|
}
|
|
|
|
.line::before {
|
|
font-size: 0.7rem;
|
|
}
|
|
}
|