carbon-componentscarbon-components-reactDescribe in detail the issue you're having.
When using the CodeSnippet component in single line mode, a horizontal scroll bar will render, which shifts the <pre> wrapped code upward so that it is not centered.
Behavior observed in Storybook

Is this issue related to a specific component?
This is related to CodeSnippet when the type prop is set to single.
What did you expect to happen? What happened instead? What would you like to
see changed?
I expected to see the code centered as it is when the text width does not exceed the container. Instead, the text shifted upwards, possibly offset by the scrollbar.
What browser are you working in?
This behavior was observed in:
What version of the Carbon Design System are you using?
This is Carbon 10 design system, with the 7.9.0 version of carbon-components-react
<CodeSnippet type="single" /> componentPlease create a reduced test case in CodeSandbox
Reproducible demo here: https://codesandbox.io/s/musing-surf-1jyot
Additionally, this is observable in the public Storybook example: http://react.carbondesignsystem.com/?path=/story/codesnippet--single-line
we're currently exploring solutions for this (ref https://github.com/carbon-design-system/carbon/issues/2304#issuecomment-580017566)
@emyarod great news! Btw the POC in that thread you posted looks great!
Most helpful comment
@emyarod great news! Btw the POC in that thread you posted looks great!