Files
hugo-asm-shortcode/assets/css/extended/asm.css
2026-02-01 15:28:11 +01:00

111 lines
1.7 KiB
CSS

/* Assembly code block styling */
.asm-raw {
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}
.asm-raw pre {
margin: 0;
padding: 1em;
}
.asm-hex,
.asm-full {
position: relative;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
line-height: 1.6;
}
.asm-hex pre,
.asm-full pre {
margin: 0;
padding: 1em;
overflow-x: auto;
background: var(--hljs-bg) !important;
color: var(--content);
}
.asm-hex code,
.asm-full code {
display: block;
background: transparent;
color: inherit;
padding: 0;
}
.asm-line {
display: block;
white-space: pre;
}
/* Address styling */
.address {
color: #858585;
margin-right: 1em;
display: inline-block;
min-width: 10ch;
user-select: none;
}
.address::after {
content: ':';
margin-left: 0.2em;
}
/* Hex bytes styling */
.hex-bytes {
color: #569cd6;
margin-right: 1.5em;
display: inline-block;
min-width: 20ch;
font-weight: 500;
}
/* Instruction styling */
.instruction {
color: #ce9178;
}
/* Ensure highlighted code displays inline */
.asm-hex .line,
.asm-full .line {
display: inline;
}
.asm-hex .cl,
.asm-full .cl {
display: inline;
}
/* Syntax highlighting enhancements for instructions */
.instruction::before {
content: '';
}
/* Dark mode compatibility */
.dark .asm-hex pre,
.dark .asm-full pre {
background: var(--hljs-bg) !important;
color: var(--content);
}
/* Light mode */
@media (prefers-color-scheme: light) {
body:not(.dark) .asm-hex pre,
body:not(.dark) .asm-full pre {
background: var(--hljs-bg) !important;
color: var(--content);
}
body:not(.dark) .address {
color: #666;
}
body:not(.dark) .hex-bytes {
color: #0451a5;
}
body:not(.dark) .instruction {
color: #a31515;
}
}