Improve line highlighting: left marker instead of different background

This commit is contained in:
Philipp Oppermann
2023-04-09 18:48:32 +02:00
parent 94d87308f4
commit 33b6b6ebe8
2 changed files with 17 additions and 3 deletions

View File

@@ -468,7 +468,7 @@ The start address specifies the memory address of our `_start` function.
Here the function name `_start` becomes important.
If we rename the function to something else (e.g., `_start_here`) and recompile, we see that no start address is set in the ELF file anymore:
```hl_lines=5
```bash,hl_lines=5
rust-objdump -f target/x86_64-unknown-none/debug/kernel
target/x86_64-unknown-none/debug/kernel: file format elf64-x86-64

View File

@@ -263,6 +263,20 @@ pre {
overflow: auto;
word-wrap: normal;
background-color: var(--code-background-color);
&.language-rust, &.language-toml {
padding-left: 15px;
mark {
border-left: 3px solid rgba(0, 200, 0, 1);
margin-left: -10px;
padding-left: 7px;
font-weight: bold;
}
}
&.language-bash mark {
font-weight: bold;
text-decoration: underline;
text-decoration-color: rgba(255, 255, 155, 1);
}
}
pre code {
padding: 0;
@@ -275,8 +289,8 @@ pre mark {
display: block;
// use the code color (instead of black)
color: inherit;
// override the background color (instead of black)
background-color: rgba(0, 255, 0, 0.1) !important;
// override the hardcoded background color (set to black by the theme)
background-color: transparent !important;
}
.highlight {