Skip to content

Commit daccd0e

Browse files
authored
Merge pull request #173 from CodexRaunak/code-blocks
Highlight filename in code blocks
2 parents af8dab7 + e5ad713 commit daccd0e

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

assets/scss/_styles_project.scss

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,30 @@ body {
7373
}
7474
}
7575

76+
.highlight[filename] {
77+
margin-top: 2rem;
78+
}
79+
80+
.highlight[filename]::before {
81+
content: attr(filename);
82+
display: block;
83+
padding: 0.5rem 0.75rem;
84+
font-size: 0.85rem;
85+
font-weight: 600;
86+
line-height: 1.2;
87+
color: #5f6b7a;
88+
background: #eef3fb;
89+
border: 1px solid var(--bs-border-color);
90+
border-bottom: 0;
91+
border-top-left-radius: 0.5rem;
92+
border-top-right-radius: 0.5rem;
93+
}
94+
95+
.highlight[filename] pre {
96+
border-top-left-radius: 0;
97+
border-top-right-radius: 0;
98+
}
99+
76100
img,
77101
.md__image img,
78102
img.md-image-responsive {

0 commit comments

Comments
 (0)