Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Force content box in code-wrapper
  • Loading branch information
pomber committed Aug 13, 2022
commit 6ac2b9673ef9844bb1b21c82f52d7a515774b49c
3 changes: 3 additions & 0 deletions packages/mdx/src/smooth-code/code-tween.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,16 @@ function Wrapper({
}) {
return (
<div
className="ch-code-wrapper"
{...htmlProps}
style={{
margin: 0,
padding: 0,
position: "relative",
// using this instead of <pre> because https://github.com/code-hike/codehike/issues/120
whiteSpace: "pre",
// to avoid resets using "border-box" that break the scrollbar https://github.com/code-hike/codehike/issues/240
boxSizing: "content-box",
...style,
...htmlProps?.style,
}}
Expand Down