Skip to content

Commit ac57afe

Browse files
rouzbeh84skipjack
authored andcommitted
fix: fix spacing on splash page (#1576)
Move `homepage.scss` styles to `splash.scss` and update class names for consistency. Add the small `margin-bottom` hack to fix the spacing issue in production. Resolves #1559
1 parent 43b44f2 commit ac57afe

File tree

4 files changed

+40
-38
lines changed

4 files changed

+40
-38
lines changed

src/components/Splash/Splash.scss

+34
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,38 @@
3232
display:none;
3333
}
3434
}
35+
36+
&__wrap {
37+
display: block;
38+
39+
@include break {
40+
margin: 0 -30px;
41+
}
42+
43+
&:before,
44+
&:after {
45+
content: " ";
46+
display: table;
47+
}
48+
49+
&:after {
50+
clear: both;
51+
}
52+
}
53+
54+
&__left,
55+
&__right {
56+
width: 100%;
57+
float: left;
58+
59+
@include break {
60+
width: 50%;
61+
padding: 0 15px;
62+
}
63+
}
64+
65+
/* XXX: Hack to fix markown parsing issues */
66+
&__right {
67+
margin-bottom: 1em;
68+
}
3569
}

src/content/index.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: webpack
44

55
## Write your code
66

7-
<div class="homepage__wrap">
8-
<div class="homepage__left">
7+
<div class="splash__wrap">
8+
<div class="splash__left">
99
__app.js__
1010

1111
```js
@@ -14,7 +14,7 @@ import bar from './bar';
1414
bar();
1515
```
1616
</div>
17-
<div class="homepage__right">
17+
<div class="splash__right">
1818
__bar.js__
1919

2020
```js
@@ -28,8 +28,8 @@ export default function bar() {
2828

2929
## Bundle with webpack
3030

31-
<div class="homepage__wrap">
32-
<div class="homepage__left">
31+
<div class="splash__wrap">
32+
<div class="splash__left">
3333
__webpack.config.js__
3434

3535
```js
@@ -41,7 +41,7 @@ module.exports = {
4141
}
4242
```
4343
</div>
44-
<div class="homepage__right">
44+
<div class="splash__right">
4545
__page.html__
4646

4747
```html
@@ -55,7 +55,6 @@ __page.html__
5555
</body>
5656
</html>
5757
```
58-
5958
</div>
6059

6160
Then run `webpack` on the command-line to create `bundle.js`.

src/styles/homepage.scss

-30
This file was deleted.

src/styles/index.scss

-1
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,3 @@ details:focus, summary:focus{
8787
}
8888

8989
@import './markdown';
90-
@import './homepage';

0 commit comments

Comments
 (0)