Skip to content

Commit ed67d6e

Browse files
authored
Merge pull request tc39#51 from tc39/lastChanges
Fixes tc39#94 - menu / submenu jumps
2 parents fe7ce78 + 44f42f9 commit ed67d6e

9 files changed

+36
-29
lines changed

_includes/proposals.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h2 class="section-headline text-end">State of Proposals</h2>
44
<div class="featurelist">
55
<h3>Stage 3</h3>
6-
<i>
6+
<i class="featurelist__desc">
77
Proposals that have been reviewed, and are being considered as
88
candidates for the spec are considered to be stage 3.
99
</i>

_layouts/default.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1 class="page-title">Specifying JavaScript.</h1>
2525
</section>
2626
<section class="footer">
2727
<span class="footer-item">
28-
<a href="https://github.com/tc39" class="btn menu-btn">github</a>
28+
<a href="https://github.com/tc39" class="btn menu-btn">GitHub</a>
2929
</span>
3030

3131
</section>
@@ -36,7 +36,7 @@ <h1 class="page-title">Specifying JavaScript.</h1>
3636
<label for="one" class="alert-message">
3737
<strong> Attention</strong> This site is in <strong>beta</strong>! We are
3838
looking for feedback. Please add issues to our <a
39-
href="https://github.com/tc39/tc39-web-draft/issues" target="_blank">github page</a>!!
39+
href="https://github.com/tc39/tc39-web-draft/issues" target="_blank">GitHub page</a>!!
4040
<span class="close">×</span>
4141
</label>
4242
</div>

_layouts/menu.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
</a>
44
<ul class="menu" id="menu">
55
<li class="menu-item has-submenu">
6-
<a href="#tc39" class="menu-link">TC39</a>
6+
<a href="#" class="menu-link">TC39</a>
77
<button class="submenu-toggle" tabindex="-1">
88
<span class="sr-only">Toggle submenu for TC39</span>
99
</button>
@@ -17,7 +17,7 @@
1717
</ul>
1818
</li>
1919
<li class="menu-item has-submenu">
20-
<a href="#specs" class="menu-link">Specs</a>
20+
<a href="#" class="menu-link">Specs</a>
2121
<button class="submenu-toggle" tabindex="-1">
2222
<span class="sr-only">Toggle submenu for Specs</span>
2323
</button>
@@ -31,7 +31,7 @@
3131
</ul>
3232
</li>
3333
<li class="menu-item has-submenu">
34-
<a href="#contribute" class="menu-link">Contribute</a>
34+
<a href="#" class="menu-link">Contribute</a>
3535
<button class="submenu-toggle" tabindex="-1">
3636
<span class="sr-only">Toggle submenu for Contribute</span>
3737
</button>

_sass/_featurelist.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,10 @@
6161
transform: rotateX(180deg);
6262
}
6363
}
64+
&__desc {
65+
margin-top: 2em;
66+
margin-bottom: 4.5em;
67+
display: block;
68+
font-size: 1.1em;
69+
}
6470
}

_sass/_page-header.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
@media (min-width: $bp-desktop) {
1818
$spacing: 90px;
1919
.page-menu {
20+
font-size: 1.1em;
2021
margin-left: $spacing;
2122
[dir="rtl"] & {
2223
margin-left: 0;

_sass/_page-menu.scss

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ $svg-height: 24;
22
$trans-timing: 600ms;
33

44
@mixin svgMenuIcon($color: currentColor, $height: $svg-height) {
5-
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="'+$height+'" viewBox="0 0 24 24" fill="none" stroke="'+$color+'" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>') no-repeat 50%;
5+
background: url(/assets/img/menu.svg) no-repeat 50%;
66
}
77

88
@mixin rotateSubmenuToggle() {
@@ -17,8 +17,6 @@ $trans-timing: 600ms;
1717
width: 100%;
1818
.submenu {
1919
background: $color-submenu-bg;
20-
border-left: 1px solid $color-spacer;
21-
border-right: 1px solid $color-spacer;
2220
flex: 0 0 100%;
2321
list-style: none;
2422
margin: 0;
@@ -100,13 +98,13 @@ $trans-timing: 600ms;
10098
}
10199
}
102100
&-link {
103-
border-bottom: 1px solid $color-spacer;
104101
color: $color-nav;
105102
display: block;
106103
flex: 0 0 calc(100% - 2rem);
107104
font-weight: normal;
108105
padding: 10px 10px;
109106
text-decoration: none;
107+
min-width: 180px;
110108
&:focus {
111109
~.submenu-toggle {
112110
@include rotateSubmenuToggle();
@@ -142,15 +140,23 @@ $trans-timing: 600ms;
142140
border-bottom: 2px solid $color-spacer;
143141
.submenu {
144142
background: $color-bg;
145-
border-left-width: 2px;
146-
border-right-width: 2px;
143+
border-top: 2px solid $color-spacer;
147144
font-size: 16px;
148145
position: absolute;
149146
&-toggle {
150147
display: none;
151148
}
149+
&-item {
150+
border-bottom: 1px solid $color-spacer;
151+
border-left: 4px solid $color-primary;
152+
}
152153
&-item:last-child {
153-
border-bottom: 2px solid $color-spacer;
154+
border-bottom: 1px solid transparent;
155+
}
156+
&-item:hover,
157+
&-item:focus {
158+
min-width: 120px;
159+
display: inline-block;
154160
}
155161
}
156162
.menu {
@@ -176,17 +182,11 @@ $trans-timing: 600ms;
176182
}
177183
}
178184
&-link {
179-
border-bottom: 4px solid transparent;
180185
flex: none;
181186
&:hover,
182187
&:focus {
183-
border-bottom-color: $color-primary;
184188
}
185189
}
186190
}
187191
}
188-
189-
@media (min-width: $bp-desktop) {
190-
font-size: 24px;
191-
}
192192
}

_sass/_popup.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ input[type=checkbox]:checked + label {
2525
border: 1px solid rgba(#34495e, 0.25);
2626
color: #b94b45;
2727
border-radius: 3px;
28-
line-height:30px;
28+
line-height: 30px;
2929
position: absolute;
3030
top: 0; left: 0;
31-
display:block;
32-
width:100%;
33-
padding: 12px;
31+
display: block;
32+
width: 100%;
33+
padding: 20px 44px;
3434
box-sizing: border-box;
3535
color: rgba(255, 255, 255, .9);
3636
box-shadow: 0px 10px 50px rgba(0,0,0,.6);

_sass/_utils.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.hidden{
1+
.hidden {
22
display:none;
33
}
44

_sass/_variables.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
$color-tc39: #f90;
2-
$color-primary: #83c9b5;
2+
$color-primary: #77ccbb;
33
$color-bg: #fefefe;
44
$color-spacer: #eee;
55
$color-text: #000;
66
$color-nav: #444;
7-
$color-submenu-bg: #f9f9f9;
7+
$color-submenu-bg: #fcfcfc;
88
$font-weight-light: 300;
99
$font-weight-regular: 400;
10-
$font-weight-semi-bold: 600;
10+
$font-weight-semi-bold: 550;
1111
$grid-gutter: 40px;
1212
$spacing-paragraph: 40px;
13-
$bp-tablet: 660px;
14-
$bp-desktop: 920px;
13+
$bp-tablet: 920px;
14+
$bp-desktop: 1200px;

0 commit comments

Comments
 (0)