mirror of https://github.com/luizdepra/hugo-coder.git

Ardemium
30.42.2024 046c15cb635c4d6b65260431d19aaeb128efd360
Fix: Code block line numbers styling issue (#820)

- Resolved the issue where enabling line numbers in code blocks caused the content to escape the code block border.
- Added necessary CSS to ensure the code block border doe not extends to contain the entire content when line numbers are enabled.
- Tested with reproduction steps to confirm the fix works across various scenarios.
- additionally fixed long string overflow that causes mobile version stretch

Fixes #820
1 files modified
8 ■■■■ changed files
assets/scss/_base.scss 8 ●●●● patch | view | raw | blame | history
assets/scss/_base.scss
@@ -44,6 +44,11 @@
  @media only screen and (max-width: 768px) {
    margin: 1.5rem 0 1.5rem 0;
  }
  white-space: pre-wrap;
  white-space: -moz-pre-wrap;
  white-space: -pre-wrap;
  white-space: -o-pre-wrap;
  word-wrap: break-word;
}
h1,
@@ -148,6 +153,7 @@
    margin: 2rem 0 2rem;
    padding: 1rem;
    border-radius: 1rem;
    overflow-x: auto;
  }
}
@@ -284,4 +290,4 @@
.fas {
  font-weight: 900;
}
}