Skip to content

Commit ea323d0

Browse files
committed
Handle markdown images in options-grid
1 parent db11d93 commit ea323d0

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/css/custom.css

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,14 +1198,19 @@ code {
11981198
}
11991199

12001200
li {
1201-
& > img {
1201+
& > img,
1202+
& > p:has(> img) > img {
12021203
display: block;
12031204
margin: 0;
12041205
border-radius: var(--ifm-global-radius);
12051206
width: 100%;
12061207
height: auto;
12071208
}
12081209

1210+
& > p {
1211+
margin: 0;
1212+
}
1213+
12091214
& > .video-player {
12101215
margin: 0;
12111216
border-radius: var(--ifm-global-radius) !important;
@@ -1218,16 +1223,17 @@ code {
12181223
}
12191224
}
12201225

1221-
& > p:first-of-type {
1226+
& > p:not(:has(> img)):first-of-type,
1227+
& > p:has(> img) + p {
12221228
font-weight: 700;
1223-
margin: calc(var(--ifm-spacing-vertical) / 2) 0 0;
1229+
margin-top: calc(var(--ifm-spacing-vertical) / 2);
12241230
}
12251231

1226-
& > p + p {
1227-
margin: calc(var(--ifm-spacing-vertical) / 4) 0 0;
1232+
& > p:not(:has(> img)) + p:not(:has(> img)) {
1233+
margin-top: calc(var(--ifm-spacing-vertical) / 4);
12281234
}
12291235

1230-
& > p:last-of-type {
1236+
& > p:last-of-type:not(:has(> img)) {
12311237
margin-bottom: var(--ifm-spacing-vertical);
12321238
}
12331239
}

0 commit comments

Comments
 (0)