Skip to content

Commit a984520

Browse files
committed
refactor: use <nav> instead of <div id="nav">
See vuejs/vue-cli#6812
1 parent 176bd49 commit a984520

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

template/code/router/src/App.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import HelloWorld from '@/components/HelloWorld.vue'
99
<div class="wrapper">
1010
<HelloWorld msg="You did it!" />
1111

12-
<div id="nav">
12+
<nav>
1313
<router-link to="/">Home</router-link>
1414
<router-link to="/about">About</router-link>
15-
</div>
15+
</nav>
1616
</div>
1717
</header>
1818

@@ -53,28 +53,28 @@ a,
5353
}
5454
}
5555
56-
#nav {
56+
nav {
5757
width: 100%;
5858
font-size: 12px;
5959
text-align: center;
6060
margin-top: 2rem;
6161
}
6262
63-
#nav a.router-link-exact-active {
63+
nav a.router-link-exact-active {
6464
color: var(--color-text);
6565
}
6666
67-
#nav a.router-link-exact-active:hover {
67+
nav a.router-link-exact-active:hover {
6868
background-color: transparent;
6969
}
7070
71-
#nav a {
71+
nav a {
7272
display: inline-block;
7373
padding: 0 1rem;
7474
border-left: 1px solid var(--color-border);
7575
}
7676
77-
#nav a:first-of-type {
77+
nav a:first-of-type {
7878
border: 0;
7979
}
8080
@@ -106,7 +106,7 @@ a,
106106
margin: 0 2rem 0 0;
107107
}
108108
109-
#nav {
109+
nav {
110110
text-align: left;
111111
margin-left: -1rem;
112112
font-size: 1rem;

template/code/typescript-router/src/App.vue

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ import HelloWorld from '@/components/HelloWorld.vue'
99
<div class="wrapper">
1010
<HelloWorld msg="You did it!" />
1111

12-
<div id="nav">
12+
<nav>
1313
<router-link to="/">Home</router-link>
1414
<router-link to="/about">About</router-link>
15-
</div>
15+
</nav>
1616
</div>
1717
</header>
1818

@@ -53,28 +53,28 @@ a,
5353
}
5454
}
5555
56-
#nav {
56+
nav {
5757
width: 100%;
5858
font-size: 12px;
5959
text-align: center;
6060
margin-top: 2rem;
6161
}
6262
63-
#nav a.router-link-exact-active {
63+
nav a.router-link-exact-active {
6464
color: var(--color-text);
6565
}
6666
67-
#nav a.router-link-exact-active:hover {
67+
nav a.router-link-exact-active:hover {
6868
background-color: transparent;
6969
}
7070
71-
#nav a {
71+
nav a {
7272
display: inline-block;
7373
padding: 0 1rem;
7474
border-left: 1px solid var(--color-border);
7575
}
7676
77-
#nav a:first-of-type {
77+
nav a:first-of-type {
7878
border: 0;
7979
}
8080
@@ -106,7 +106,7 @@ a,
106106
margin: 0 2rem 0 0;
107107
}
108108
109-
#nav {
109+
nav {
110110
text-align: left;
111111
margin-left: -1rem;
112112
font-size: 1rem;

0 commit comments

Comments
 (0)