Skip to content

Commit c613ac7

Browse files
committed
fixed clipped header
1 parent d5d2784 commit c613ac7

File tree

2 files changed

+28
-29
lines changed

2 files changed

+28
-29
lines changed

site/_css/graphql.less

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,6 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
171171
z-index: 100;
172172
}
173173

174-
.nav-main:before, .nav-main:after {
175-
content: " ";
176-
display: table;
177-
}
178-
179-
.nav-main:after {
180-
clear: both;
181-
}
182-
183174
.nav-main a {
184175
text-decoration: none;
185176
transition: color 0.1s ease-out
@@ -247,21 +238,27 @@ h1:hover .hash-link, h2:hover .hash-link, h3:hover .hash-link, h4:hover .hash-li
247238
background: #222;
248239
color: #f8f8f8;
249240
height: 80vh;
250-
display: flex;
251-
align-items: center;
252-
justify-content: center;
253-
flex-direction: column;
254241
position: relative;
255242
z-index: 101;
256243
margin-top: -50px;
257244
padding-top: 50px;
245+
246+
.abs {
247+
display: flex;
248+
align-items: center;
249+
justify-content: center;
250+
flex-direction: column;
251+
position: absolute;
252+
top: 0;
253+
left: 0;
254+
bottom: 0;
255+
right: 0;
256+
clip: rect(0, auto, auto, 0);
257+
overflow: hidden;
258+
}
258259
}
259260

260261
.nav-main.hero-nav {
261-
position: absolute;
262-
top: 0;
263-
height: 50px;
264-
width: 1020px;
265262
background: none;
266263
box-shadow: none;
267264
}

site/index.html.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,23 @@ var index = React.createClass({
99
return (
1010
<Site>
1111
<div className="hero">
12-
<div className="hero-nav nav-main">
13-
<div className="wrap">
14-
<div className="algolia-search-wrapper">
15-
<input id="algolia-doc-search" type="text" placeholder="Search docs..." />
12+
<div className="abs">
13+
<div className="hero-nav nav-main">
14+
<div className="wrap">
15+
<div className="algolia-search-wrapper">
16+
<input id="algolia-doc-search" type="text" placeholder="Search docs..." />
17+
</div>
18+
<HeaderLinks section={this.props.section} />
1619
</div>
17-
<HeaderLinks section={this.props.section} />
1820
</div>
19-
</div>
2021

21-
<div className="content">
22-
<img className="main-logo" src={'/img/logo.svg'} width="240" height="240" />
23-
<h1 className="text"><strong>GraphQL</strong></h1>
24-
<h2 className="minitext">
25-
{SiteData.description}
26-
</h2>
22+
<div className="content">
23+
<img className="main-logo" src={'/img/logo.svg'} width="240" height="240" />
24+
<h1 className="text"><strong>GraphQL</strong></h1>
25+
<h2 className="minitext">
26+
{SiteData.description}
27+
</h2>
28+
</div>
2729
</div>
2830
</div>
2931

0 commit comments

Comments
 (0)