Files
hugo-asm-shortcode/assets/css/extended/asm.css
2026-03-03 20:43:02 +01:00

149 lines
2.3 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,
.asm-ida {
position: relative;
font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
line-height: 1.6;
}
.asm-hex pre,
.asm-full pre,
.asm-ida pre {
margin: 0;
padding: 1em;
overflow-x: auto;
background: var(--hljs-bg) !important;
color: var(--content);
}
.asm-hex code,
.asm-full code,
.asm-ida 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: 15ch;
font-weight: 500;
}
/* Instruction styling */
.instruction {
color: #ce9178;
}
/* IDA-style address styling */
.ida-address {
color: #858585;
margin-right: 0.5em;
display: inline-block;
min-width: 25ch;
user-select: none;
}
.ida-separator {
color: #666;
margin-right: 1em;
user-select: none;
}
/* Ensure highlighted code displays inline */
.asm-hex .line,
.asm-full .line,
.asm-ida .line {
display: inline;
}
.asm-hex .cl,
.asm-full .cl,
.asm-ida .cl {
display: inline;
}
/* Syntax highlighting enhancements for instructions */
.instruction::before {
content: '';
}
/* Dark mode compatibility */
.dark .asm-hex pre,
.dark .asm-full pre,
.dark .asm-ida pre {
background: var(--hljs-bg) !important;
color: var(--content);
}
.dark .ida-address {
color: #858585;
}
.dark .ida-separator {
color: #666;
}
/* Light mode */
@media (prefers-color-scheme: light) {
body:not(.dark) .asm-hex pre,
body:not(.dark) .asm-full pre,
body:not(.dark) .asm-ida 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;
}
body:not(.dark) .ida-address {
color: #666;
}
body:not(.dark) .ida-separator {
color: #999;
}
}