Skip to content

Commit 26deb1c

Browse files
jamiemccuechasenlehara
authored andcommitted
Show the version selector at smaller screen widths (#541)
Fixes #458
1 parent 0ee9b8e commit 26deb1c

File tree

1 file changed

+62
-63
lines changed

1 file changed

+62
-63
lines changed

static/header.less

Lines changed: 62 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
width: 60px;
3636
height: @brand-height;
3737
cursor: pointer;
38+
margin: 0 @gutter 0 0;
3839
&:hover > a {
3940
opacity: .7;
4041
}
@@ -53,78 +54,76 @@
5354
}
5455
}
5556

56-
// ----- CANJS LOGO AND VERSION DESKTOP -----
57-
@media screen and (min-width: @breakpoint) {
58-
.brand {
59-
.dropdown {
60-
position: absolute;
61-
top: 52px;
62-
background-color: white;
63-
border: 1px solid #ccc;
64-
box-shadow: 0 6px 12px rgba(0,0,0,.175);
65-
}
57+
// ----- DROPDOWNS -----
6658

67-
.logo {
68-
margin: 0 @gutter 0 0;
59+
.brand {
60+
.dropdown {
61+
position: absolute;
62+
top: 52px;
63+
background-color: white;
64+
border: 1px solid #ccc;
65+
box-shadow: 0 6px 12px rgba(0,0,0,.175);
66+
}
6967

70-
&:hover .dropdown {
71-
display: block;
72-
}
73-
.project-dropdown {
74-
left: 20px;
75-
width: 180px;
76-
}
77-
.project-dropdown a {
78-
color: black;
79-
font-size: 14px;
80-
padding: 12px 16px;
81-
text-decoration: none;
82-
display: block;
83-
&:hover {
84-
background-color: @light-gray-color;
85-
}
86-
}
68+
.logo {
69+
margin: 0 @gutter 0 0;
70+
&:hover .dropdown {
71+
display: block;
8772
}
88-
.version {
89-
display: flex;
90-
align-items: center;
91-
font-size: 12px;
92-
height: @brand-height;
93-
padding-top: 7px;
94-
cursor: pointer;
95-
.version-number::after {
96-
display: inline-block;
97-
width: 15px;
98-
height: 15px;
99-
vertical-align: bottom;
100-
content: '';
101-
background-image: url(img/down_black.svg);
102-
background-size: cover;
103-
background-repeat: no-repeat;
104-
}
105-
&:hover > a {
106-
opacity: .7;
107-
}
108-
&:hover .dropdown {
109-
display: block;
110-
}
111-
.version-dropdown {
112-
left: 100px;
113-
width: 100px;
73+
.project-dropdown {
74+
width: 180px;
75+
}
76+
.project-dropdown a {
77+
color: black;
78+
font-size: 14px;
79+
padding: 12px 16px;
80+
text-decoration: none;
81+
display: block;
82+
&:hover {
83+
background-color: @light-gray-color;
11484
}
115-
.version-dropdown a {
116-
color: black;
117-
padding: 5px 10px;
118-
text-decoration: none;
119-
display: block;
120-
&:hover {
121-
background-color: @light-gray-color;
122-
}
85+
}
86+
}
87+
.version {
88+
display: flex;
89+
align-items: center;
90+
font-size: 12px;
91+
height: @brand-height;
92+
padding-top: 7px;
93+
cursor: pointer;
94+
margin: 0 @gutter/3 0 0;
95+
.version-number::after {
96+
display: inline-block;
97+
width: 15px;
98+
height: 15px;
99+
vertical-align: bottom;
100+
content: '';
101+
background-image: url(img/down_black.svg);
102+
background-size: cover;
103+
background-repeat: no-repeat;
104+
}
105+
&:hover > a {
106+
opacity: .7;
107+
}
108+
&:hover .dropdown {
109+
display: block;
110+
}
111+
.version-dropdown {
112+
width: 100px;
113+
}
114+
.version-dropdown a {
115+
color: black;
116+
padding: 5px 10px;
117+
text-decoration: none;
118+
display: block;
119+
&:hover {
120+
background-color: @light-gray-color;
123121
}
124122
}
125123
}
126124
}
127125

126+
128127
// ----- CHAT, FORUM, GITHUB STAR, TWITTER -----
129128
.top-right-links {
130129
margin: 0 auto;

0 commit comments

Comments
 (0)