Skip to content

Commit 8b7f900

Browse files
author
Eugene Bannykh
committed
Responsive design improvements, new breakpoints variables
1 parent b1550a8 commit 8b7f900

15 files changed

+94
-130
lines changed

css/app.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ $(function() {
1111
$('.version-switcher').clone().addClass('version-switcher-mobile').appendTo('.nav-main-mobile');
1212

1313
// Responsive item expand/collapse
14-
$('.nav-main-mobile a').each(function () {
14+
$('.nav-main a').each(function () {
1515
var $this = $(this);
1616
var $children = $this.closest('li').find('ul');
1717

scss/_reset.scss

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
11

22
.clearfix {
3-
*zoom: 1
3+
*zoom: 1
44
}
55
.clearfix:before,
66
.clearfix:after {
7-
display: table;
8-
content: "";
9-
line-height: 0
7+
display: table;
8+
content: "";
9+
line-height: 0
1010
}
1111
.clearfix:after {
12-
clear: both
12+
clear: both
1313
}
1414
.hide-text {
15-
font: 0/0 a;
16-
color: transparent;
17-
text-shadow: none;
18-
background-color: transparent;
19-
border: 0
15+
font: 0/0 a;
16+
color: transparent;
17+
text-shadow: none;
18+
background-color: transparent;
19+
border: 0
2020
}
2121
.input-block-level {
22-
display: block;
23-
width: 100%;
24-
min-height: 30px;
25-
-webkit-box-sizing: border-box;
26-
-moz-box-sizing: border-box;
27-
box-sizing: border-box
22+
display: block;
23+
width: 100%;
24+
min-height: 30px;
25+
-webkit-box-sizing: border-box;
26+
-moz-box-sizing: border-box;
27+
box-sizing: border-box
28+
}
29+
30+
31+
32+
*, *:before, *:after {
33+
box-sizing: border-box;
2834
}
35+
36+
2937
article,
3038
aside,
3139
details,
@@ -49,25 +57,25 @@ audio:not([controls]) {
4957
display: none
5058
}
5159
html {
52-
font-size: 100%;
53-
-webkit-text-size-adjust: 100%;
54-
-ms-text-size-adjust: 100%
60+
font-size: 100%;
61+
-webkit-text-size-adjust: 100%;
62+
-ms-text-size-adjust: 100%
5563
}
5664
a:focus {
57-
outline: thin dotted #333;
58-
outline: 5px auto -webkit-focus-ring-color;
59-
outline-offset: -2px
65+
outline: thin dotted #333;
66+
outline: 5px auto -webkit-focus-ring-color;
67+
outline-offset: -2px
6068
}
6169
a:hover,
6270
a:active {
63-
outline: 0
71+
outline: 0
6472
}
6573
sub,
6674
sup {
67-
position: relative;
68-
font-size: 75%;
69-
line-height: 0;
70-
vertical-align: baseline
75+
position: relative;
76+
font-size: 75%;
77+
line-height: 0;
78+
vertical-align: baseline
7179
}
7280
sup {
7381
top: -0.5em
@@ -122,19 +130,13 @@ input[type="radio"],
122130
input[type="checkbox"] {
123131
cursor: pointer
124132
}
125-
input[type="search"] {
126-
-webkit-box-sizing: content-box;
127-
-moz-box-sizing: content-box;
128-
box-sizing: content-box;
129-
-webkit-appearance: textfield
130-
}
131133
input[type="search"]::-webkit-search-decoration,
132134
input[type="search"]::-webkit-search-cancel-button {
133-
-webkit-appearance: none
135+
-webkit-appearance: none
134136
}
135137
textarea {
136-
overflow: auto;
137-
vertical-align: top
138+
overflow: auto;
139+
vertical-align: top
138140
}
139141

140142
/* allow images/media to gracefully resize according to their enclosing tag */

scss/_variables.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
$body-font-family: 'Open Sans', 'Helvetica', 'Arial', sans-serif;
22

33

4+
5+
46
$header-height: 56px;
57

8+
// Breakpoints
9+
$small-screen: 'max-width: 768px';
10+
$medium-screen: 'max-width: 1023px';
11+
$large-screen: 'min-width: 1500px';
12+
613

714
// Colors
815
$brand-color: #F26322;

scss/partials/_footer.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
}
3434

3535

36-
@media (max-width:767px) {
36+
@media ( $small-screen ) {
3737

3838
margin: 0;
3939
padding: 10px 0;

scss/partials/_home.scss

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
.search-form {
99
margin-top: 20px;
10+
.input-group {
11+
width: 100%;
12+
}
1013
}
1114

1215
}
@@ -39,7 +42,7 @@
3942
padding: 0;
4043
}
4144

42-
@media (max-width:767px) {
45+
@media ( $small-screen ) {
4346

4447
.feature {
4548
width: 100%;

scss/partials/_layout.scss

Lines changed: 20 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,6 @@ html,body {
2828
}
2929

3030

31-
32-
33-
3431
.container:before, .container:after {
3532
display: table;
3633
content: "";
@@ -42,21 +39,6 @@ html,body {
4239

4340

4441

45-
46-
47-
/*
48-
.main-container {
49-
padding-top: 105px;
50-
background: #fff
51-
}
52-
53-
#gl-wrapper {
54-
width: 100%;
55-
position: relative;
56-
z-index: 50;
57-
}
58-
*/
59-
6042
.full-width-content {
6143
width: 90%;
6244
}
@@ -76,9 +58,7 @@ html,body {
7658

7759

7860
// for large screens, make more whitespace on sides
79-
@media (min-width: 1500px){
80-
81-
61+
@media ($large-screen){
8262

8363
.container {
8464
padding-left: 66px;
@@ -90,7 +70,7 @@ html,body {
9070
}
9171

9272
// For smaller screens, remove toc from left column and show in-page-toc
93-
@media ( max-width: 1024px ) {
73+
@media ( $medium-screen) {
9474

9575
.content-wrap {
9676
margin-right: 0;
@@ -104,65 +84,36 @@ html,body {
10484
padding: 0;
10585
}
10686

107-
}
108-
109-
11087

88+
.pane-content .container {
89+
padding: 0;
90+
}
11191

112-
@media (max-width:767px) {
92+
.container, .page-intro .container, .home-section .container {
93+
padding: 0 20px;
94+
}
11395

96+
.main-container {
97+
width: 100%;
98+
overflow-x: auto;
99+
}
114100

101+
.content {
102+
float: none;
103+
width: auto;
104+
padding: 10px 20px;
105+
}
115106

116-
.pane-content .container {
107+
.content .content-wrap {
117108
padding: 0;
118-
}
119-
120-
.container, .page-intro .container, .home-section .container {
121-
padding: 0 20px;
122-
}
123-
124-
.main-container {
125-
width: 100%;
126-
overflow-x: auto;
127-
}
128-
129-
.content {
130-
float: none;
131-
width: auto;
132-
padding: 10px 20px;
133-
}
134-
135-
.content .content-wrap {
136-
padding: 0;
137-
}
109+
}
138110

139111

140112

141-
142-
143-
144-
145-
#searchResultsBox {
146-
left: 0;
147-
top:0;
148-
right: 0;
149-
bottom: 0;
150-
height: 100%;
151-
overflow-x: hidden;
152-
}
153-
154-
#searchResultsBox .gsc-control-wrapper-cse {
155-
width: 100%;
156-
height: 100%;
157-
}
158-
159-
.searchResultsBack {
160-
background: #fff;
161-
opacity: 1;
162-
}
163113
}
164114

165115

116+
166117
.affix {
167118
position: fixed;
168119
}

scss/partials/_nav-main.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
}
7575
li.has-children > a{
7676
border-bottom: none;
77+
cursor: default;
7778
}
7879
a, a:visited {
7980
color: $body-font-color;
@@ -188,7 +189,7 @@ body.offcanvas-active {
188189
overflow: hidden;
189190
}
190191

191-
@media (max-width:1023px) {
192+
@media ( $medium-screen ) {
192193

193194
.nav-main {
194195
position: fixed;

scss/partials/_page-info.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
}
5050

5151

52-
@media (max-width:1023px) {
52+
@media ( $medium-screen ) {
5353
.page-info {
5454
border-top: 1px solid $light-gray-color;
5555
margin: 20px 0 0 0;
@@ -58,6 +58,5 @@
5858
padding: 15px 0 0 0;
5959
font-size: 14px;
6060
}
61-
62-
61+
6362
}

scss/partials/_search.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,10 @@
3232
font-size: 16px;
3333
}
3434

35-
@media (max-width:767px) {
35+
@media ( $small-screen ) {
3636
.input-group-btn {
3737
display: none;
3838
}
39-
4039
}
4140

4241
}

0 commit comments

Comments
 (0)