Skip to content

Commit b97cd84

Browse files
committed
Add css to render code block list with flex wrap on desktop
1 parent ebb84f1 commit b97cd84

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

app/javascript/css/components/code.scss

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,33 @@ svg {
118118
.clipboard-copy-container {
119119
font-family: var(--sans-serif);
120120
}
121+
122+
.code-examples--list {
123+
display: flex;
124+
flex-wrap: wrap;
125+
gap: var(--space-xs);
126+
margin-top: var(--space-xs);
127+
justify-content: start;
128+
129+
h3 {
130+
margin-bottom: var(--space-xs);
131+
}
132+
133+
& > * {
134+
max-width: 100%;
135+
margin-bottom: var(--grid-gutter);
136+
}
137+
138+
& .code-wrapper {
139+
margin-inline-start: 0;
140+
margin-inline-end: 0;
141+
}
142+
}
143+
144+
@media screen and (min-width: $screen-md) {
145+
.code-examples--list {
146+
& > * {
147+
width: 45%;
148+
}
149+
}
150+
}

0 commit comments

Comments
 (0)