Skip to content

Commit 2677025

Browse files
committed
Fix codeblock violating parent widht
1 parent 155e438 commit 2677025

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

src/plugins/remark-steps.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const remarkSteps: Plugin<[], Root> = () => {
1818
(child: { type: string; name: string }) =>
1919
child.type === "containerDirective" && child.name === "step",
2020
);
21-
console.log(steps);
2221
// We need to construct the necessary UI components for the tabs
2322
const wrapper = {
2423
type: "element",
@@ -92,7 +91,14 @@ const remarkSteps: Plugin<[], Root> = () => {
9291
{ type: "text", value: step.attributes.title },
9392
],
9493
},
95-
step,
94+
{
95+
data: {
96+
hProperties: {
97+
className: "step-data-content",
98+
},
99+
},
100+
...step,
101+
},
96102
],
97103
},
98104
],

src/styles/global.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,7 @@ ul {
3939
a {
4040
@apply underline;
4141
}
42+
43+
pre {
44+
@apply overflow-scroll;
45+
}

src/styles/markdown-layout.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ div.tabs .selector div[data-tab-selector-key]:not(:first-child) {
6969
}
7070

7171
div.tabs .tabs-content {
72-
@apply p-4 border-1 border-neutral-300 rounded-b-md;
72+
@apply w-full p-4 border-1 border-neutral-300 rounded-b-md;
7373
}
7474

7575
div.tabs div.selector div[data-tab-selector-key]:not(.active-selector) {
@@ -101,9 +101,13 @@ div.steps div.steps-content div.step div.divider {
101101
}
102102

103103
div.steps div.steps-content div.step div.step-data {
104-
@apply w-full;
104+
@apply w-full min-w-0;
105105
}
106106

107107
div.steps div.steps-content div.step div.step-data p.step-title {
108108
@apply font-bold;
109109
}
110+
111+
div.steps div.steps-content div.step div.step-data div.step-data-content {
112+
@apply w-full;
113+
}

0 commit comments

Comments
 (0)