code template

This commit is contained in:
m
2026-03-25 08:08:07 +01:00
parent 20fce270a5
commit 2118d9fbc0
5 changed files with 26 additions and 3 deletions

View File

@@ -0,0 +1,16 @@
.code-block {
display: block;
white-space: pre-wrap; /* Allows the code to wrap within the container */
word-wrap: break-word; /* Ensures long words break to fit the container */
max-width: 100%; /* Ensures the code block doesn't exceed the container's width */
padding: 10px; /* Adds padding for better readability */
background-color: #f5f5f5; /* Light gray background for contrast */
border: 1px solid #ddd; /* Subtle border to distinguish the code block */
border-radius: 5px; /* Rounded corners for aesthetics */
overflow-x: auto; /* Adds horizontal scroll if necessary */
}
.code-block .comment {
text-indent: 8em;
color: #408080;
}