Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions site/src/components/shortcodes/Code.astro
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ if (filePath && fileMatch && codeToDisplay) {
})
</script>

<div class:list={[{ 'bd-code-snippet': !nestedInExample }, containerClass]}>
<div class:list={[{ 'bd-code-snippet': !nestedInExample }, containerClass, 'highlight-container']}>
{Astro.slots.has('bar') ? <slot name="bar" /> : null}
<div class="highlight pe-md-4xl">
<div class:list={['highlight', { 'pe-md-4xl': !nestedInExample }]}>
{
codeToDisplay && lang ? (
<Prism code={codeToDisplay} lang={lang} />
Expand Down
8 changes: 5 additions & 3 deletions site/src/scss/_component-examples.scss
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@
//
// Code snippets
//
.highlight-container {
background-color: var(--bd-pre-bg);
}

.highlight {
position: relative;
Expand All @@ -386,7 +389,7 @@
background-color: var(--bd-pre-bg);

@include media-breakpoint-up(md) {
padding-right: 3.5rem; // OUDS mod: instead of `padding: .75rem 1.25rem`
// OUDS mod: no `padding: .75rem 1.25rem`
@include border-radius(calc(var(--bs-border-radius) - 1px));
}

Expand All @@ -398,8 +401,7 @@

pre {
padding: 0 0 .75rem; // OUDS mod: instead of `padding: .25rem 0 .875rem`
margin-top: .5rem; // OUDS mod: instead of `margin-top: .8125rem`
margin-bottom: 0;
margin: .5rem 0; // OUDS mod: instead of `margin-top: .8125rem` & `margin-bottom: 0`
overflow: overlay;
white-space: pre;
background-color: transparent;
Expand Down
Loading