Skip to content

Commit 083b79e

Browse files
committed
more reliance on css for mobile views
1 parent 7cd57a6 commit 083b79e

File tree

10 files changed

+60
-44
lines changed

10 files changed

+60
-44
lines changed

_src/app/docs/src/index.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ var { Route, DefaultRoute, RouteHandler } = Router;
55
var DocHeader = require('./DocHeader');
66
var TypeDocumentation = require('./TypeDocumentation');
77
var defs = require('../../../resources/immutable.d.json');
8-
var isMobile = require('./isMobile');
98

109

1110
var Documentation = React.createClass({
1211
render() {
1312
return (
14-
<div className={isMobile ? 'mobile' : null}>
13+
<div>
1514
<DocHeader />
1615
<div className="pageBody" id="body">
1716
<div className="contents">

_src/app/docs/src/isMobile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
var isMobile =
22
window.matchMedia && window.matchMedia('(max-device-width: 680px)');
3-
module.exports = !!(isMobile && isMobile.matches);
3+
module.exports = false && !!(isMobile && isMobile.matches);

_src/app/docs/src/style.less

+30-12
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
z-index: 1;
1919
}
2020

21-
.mobile .miniHeader {
22-
position: relative;
21+
@media only screen and (max-width: 680px) {
22+
.miniHeader {
23+
position: relative;
24+
}
2325
}
2426

2527
.miniHeaderContents {
@@ -30,8 +32,10 @@
3032
text-align: right;
3133
}
3234

33-
.mobile .miniHeaderContents {
34-
text-align: left;
35+
@media only screen and (max-width: 680px) {
36+
.miniHeaderContents {
37+
text-align: left;
38+
}
3539
}
3640

3741
.logo {
@@ -40,8 +44,10 @@
4044
top: 12px;
4145
}
4246

43-
.mobile .logo {
44-
display: none;
47+
@media only screen and (max-width: 680px) {
48+
.logo {
49+
display: none;
50+
}
4551
}
4652

4753
.logo > .svg {
@@ -70,6 +76,12 @@
7076
z-index: 0;
7177
}
7278

79+
@media only screen and (max-width: 680px) {
80+
.sideBar {
81+
display: none;
82+
}
83+
}
84+
7385
.sideBar .scrollContent {
7486
box-sizing: border-box;
7587
height: 100%;
@@ -104,8 +116,10 @@
104116
margin-left: 240px;
105117
}
106118

107-
.mobile .docContents {
108-
margin-left: 0;
119+
@media only screen and (max-width: 680px) {
120+
.docContents {
121+
margin-left: 0;
122+
}
109123
}
110124

111125
.t a {
@@ -188,8 +202,10 @@ code {
188202
margin: 0;
189203
}
190204

191-
.mobile .memberLabel {
192-
cursor: pointer;
205+
@media only screen and (max-width: 680px) {
206+
.memberLabel {
207+
cursor: pointer;
208+
}
193209
}
194210

195211
.detail {
@@ -205,8 +221,10 @@ code {
205221
margin: 3rem 0 2rem;
206222
}
207223

208-
.mobile .groupTitle {
209-
margin: 2em 0 1em;
224+
@media only screen and (max-width: 680px) {
225+
.groupTitle {
226+
margin: 2em 0 1em;
227+
}
210228
}
211229

212230
.doc {

_src/resources/immutable.d.json

+1-1
Large diffs are not rendered by default.

docs/bundle.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/bundle.js

+4-5
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)