Assigning a class disables the "copy code" button #446
Unanswered
lloydjatkinson
asked this question in
Q&A
Replies: 2 comments
|
Oh, weird bug. Not sure why that happens. I guess you could apply the class one level up instead? <Box style={`border-top: 1px solid ${vars.borderColor.neutral}`} class="preview-container">
<Code code={snippet} lang="astro" />
</Box>
<style>
.preview-container :global(.expressive-code) {
--ec-brdWd: 0;
}
</style> |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm trying to customise specific parts of the
<Code>component (but only specific instances, not globally) so if I do this:<Box style={`border-top: 1px solid ${vars.borderColor.neutral}`}> - <Code code={snippet} lang="astro" /> + <Code code={snippet} lang="astro" class="preview-snippet" /> </Box> <style> :global(.preview-snippet) { --ec-brdWd: 0; } </style>The copy code button vanishes. Ultimately, how do I disable the border radius of a code block without removing that button?
All reactions