Skip to content

Commit

Permalink
feat(#62): adjust code block styles to accomodate line highlighting
Browse files Browse the repository at this point in the history
  • Loading branch information
meganesu committed Jun 19, 2024
1 parent aa0fdbd commit 41c75aa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/components/code-block/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
preWrapper as preWrapperStyles,
pre as preStyles,
code as codeStyles,
highlight as highlightStyles,
} from "./styles.module.css"

const CodeBlock = (props) => {
Expand Down
8 changes: 6 additions & 2 deletions src/components/code-block/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@

.pre-wrapper {
overflow: auto;
padding-right: 1rem;
}

.pre {
margin-left: 1rem;
min-width: fit-content;
}

.code {
display: block;
padding: 0rem 1rem;
}

.highlight {
background-color: rgba(84, 146, 255, 0.25);
}

0 comments on commit 41c75aa

Please sign in to comment.