Skip to content

Commit ac23f26

Browse files
committed
修复mdxrepl 包含代码块导致 step 左侧溢出问题
1 parent 4e0238e commit ac23f26

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/assets/styles/advance-step.css

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ ol.advanced-steps {
55

66
list-style: none !important;
77
counter-reset: advanced-step-counter;
8-
padding-left: 0;
9-
margin-left: 1rem;
8+
padding-left: 0 !important;
9+
margin-left: .3rem;
1010
margin-top: 1rem;
1111
position: relative;
12+
box-sizing: border-box;
1213
}
1314

1415
ol.advanced-steps>li {
@@ -109,6 +110,14 @@ ol.advanced-steps>li ul {
109110
padding-left: 2rem;
110111
}
111112

113+
/* Make code blocks inside steps wrap properly
114+
修复 mdxrepl展示区包含代码块时, step渲染后左侧溢出问题
115+
*/
116+
ol.advanced-steps>li pre {
117+
white-space: pre-wrap;
118+
word-wrap: break-word;
119+
}
120+
112121
/* Hide the auto-link anchor from headings inside steps */
113122
ol.advanced-steps>li h2>a,
114123
ol.advanced-steps>li h3>a,

0 commit comments

Comments
 (0)