Skip to content

Commit 9a0c186

Browse files
committed
Add default margin
1 parent ba9be7d commit 9a0c186

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

packages/mdx/src/client/scrollycoding.scss

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,22 +49,26 @@
4949
.ch-scrollycoding-sticker {
5050
height: 80vh;
5151
gap: 0.5rem;
52-
}
5352

54-
.ch-scrollycoding-sticker .ch-editor-frame,
55-
.ch-scrollycoding-sticker .ch-code {
56-
flex: 1;
53+
.ch-codeblock,
54+
.ch-codegroup {
55+
flex: 1;
56+
}
5757
}
5858

5959
.ch-scrollycoding-preview {
6060
height: 280px;
6161
}
6262
}
6363

64-
.ch-scrollycoding-sticker .ch-editor-frame,
65-
.ch-scrollycoding-sticker .ch-code {
66-
width: 100%;
67-
min-width: 100%;
68-
min-height: 200px;
69-
max-height: 80vh;
64+
.ch-scrollycoding-sticker {
65+
.ch-codeblock,
66+
.ch-codegroup {
67+
width: 100%;
68+
min-width: 100%;
69+
min-height: 200px;
70+
max-height: 80vh;
71+
margin-top: 0;
72+
margin-bottom: 0;
73+
}
7074
}

packages/mdx/src/client/slideshow.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
.ch-slideshow-slide .ch-codegroup,
1414
.ch-slideshow-slide .ch-codeblock {
1515
flex: 2;
16+
margin-top: 0;
17+
margin-bottom: 0;
1618
}
1719

1820
.ch-slideshow-preview {

packages/mdx/src/client/spotlight.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@
4747
min-width: 100%;
4848
min-height: Min(100%, 80vh);
4949
max-height: 80vh;
50+
margin-top: 0;
51+
margin-bottom: 0;
5052
flex: 1;
5153
}
5254

packages/mdx/src/index.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,12 @@
1818
}
1919
}
2020

21+
.ch-codeblock,
22+
.ch-codegroup {
23+
margin-top: 1.25em;
24+
margin-bottom: 1.25em;
25+
}
26+
2127
.ch-inline-code > code {
2228
padding: 0.2em 0.4em;
2329
margin: 0.1em -0.1em;

packages/playground/content/simple-code.mdx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ function lorem(ipsum, dolor = 1) {
66
}
77
```
88

9-
---
10-
119
```js
1210
function lorem(ipsum, dolor = 1) {}
1311
```

0 commit comments

Comments
 (0)