Skip to content

Commit 505efa0

Browse files
committed
Fix styling
1 parent 137f0ff commit 505efa0

File tree

1 file changed

+24
-22
lines changed

1 file changed

+24
-22
lines changed

src/pages/index.js

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,21 @@ class Home extends Component {
144144
<Container>
145145
<div css={[sharedStyles.markdown, markdownStyles]}>
146146
<section
147-
className="home-section"
148-
css={{
149-
[media.lessThan('medium')]: {
150-
marginTop: 0,
151-
marginBottom: 0,
152-
overflowX: 'auto',
153-
paddingTop: 30,
154-
WebkitOverflowScrolling: 'touch',
155-
position: 'relative',
156-
maskImage:
157-
'linear-gradient(to right, transparent, white 10px, white 90%, transparent)',
147+
css={[
148+
sectionStyles,
149+
{
150+
[media.lessThan('medium')]: {
151+
marginTop: 0,
152+
marginBottom: 0,
153+
overflowX: 'auto',
154+
paddingTop: 30,
155+
WebkitOverflowScrolling: 'touch',
156+
position: 'relative',
157+
maskImage:
158+
'linear-gradient(to right, transparent, white 10px, white 90%, transparent)',
159+
},
158160
},
159-
}}>
161+
]}>
160162
<div
161163
css={{
162164
display: 'flex',
@@ -233,7 +235,7 @@ class Home extends Component {
233235
borderBottom: `1 solid ${colors.divider}`,
234236
}}
235237
/>
236-
<section className="home-section">
238+
<section css={sectionStyles}>
237239
<div id="examples">
238240
<div className="example">
239241
<h3>A Simple Component</h3>
@@ -385,18 +387,18 @@ export const pageQuery = graphql`
385387
386388
export default Home;
387389
388-
// TODO This nasty CSS is required because 'docs/index.md' defines hard-coded class names.
389-
const markdownStyles = {
390-
'& .home-section': {
391-
marginTop: 20,
392-
marginBottom: 15,
390+
const sectionStyles = {
391+
marginTop: 20,
392+
marginBottom: 15,
393393
394-
[media.greaterThan('medium')]: {
395-
marginTop: 60,
396-
marginBottom: 65,
397-
},
394+
[media.greaterThan('medium')]: {
395+
marginTop: 60,
396+
marginBottom: 65,
398397
},
398+
};
399399
400+
// TODO This nasty CSS is required because 'docs/index.md' defines hard-coded class names.
401+
const markdownStyles = {
400402
'& .example': {
401403
marginTop: 40,
402404

0 commit comments

Comments
 (0)