Skip to content

Commit 7f440d0

Browse files
committed
style: use more exact class selector, and clean old element selector code.
1 parent 96a6cc6 commit 7f440d0

File tree

3 files changed

+28
-20
lines changed

3 files changed

+28
-20
lines changed

docs/.vuepress/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ module.exports = {
110110
items: [
111111
{
112112
text: 'Vue Curated',
113-
link: 'ttps://curated.vuejs.org/'
113+
link: 'https://curated.vuejs.org/'
114114
},
115115
{
116116
text: 'Awesome Vue',

lib/default-theme/NavLinks.vue

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,13 @@
1212
<span class="arrow"></span>
1313
<ul class="nav-dropdown">
1414
<li
15+
class="dropdown-item"
1516
v-for="subItem in item.items"
1617
:key="subItem.link">
1718
<h4 v-if="subItem.type === 'links'">{{ subItem.text }}</h4>
18-
<ul v-if="subItem.type === 'links'">
19+
<ul class="dropdown-subitem-wrapper" v-if="subItem.type === 'links'">
1920
<li
21+
class="dropdown-subitem"
2022
v-for="childSubItem in subItem.items"
2123
:key="childSubItem.link">
2224
<nav-link :item="childSubItem"></nav-link>
@@ -100,9 +102,18 @@ export default {
100102
border-right 4px solid transparent
101103
border-top 5px solid #ccc
102104
.nav-dropdown
103-
li
105+
.dropdown-item
104106
color inherit
105107
line-height 1.7rem
108+
h4
109+
margin 0.45rem 0 0
110+
border-top 1px solid #eee
111+
padding 0.45rem 1.5rem 0 1.25rem
112+
.dropdown-subitem-wrapper
113+
padding 0
114+
list-style none
115+
.dropdown-subitem
116+
font-size 0.9em
106117
a
107118
display block
108119
height 1.7rem
@@ -130,13 +141,6 @@ export default {
130141
margin-top 0
131142
padding-top 0
132143
border-top 0
133-
& > h4
134-
margin 0.45rem 0 0
135-
border-top 1px solid #eee
136-
padding 0.45rem 1.5rem 0 1.25rem
137-
& > ul
138-
padding 0
139-
list-style none
140144
.github-link
141145
margin-left 1.5rem
142146

lib/default-theme/Sidebar.vue

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,21 @@ function resolveOpenGroupIndex (route, items) {
9090
.nav-item .dropdown-wrapper
9191
.dropdown-title
9292
display inline-block
93-
margin-bottom 5px
93+
margin-bottom 0.5rem
9494
.nav-dropdown
95-
li, h4
96-
font-size 15px
97-
line-height 1.7rem
98-
h4
99-
border-top 0
100-
margin-top 0
101-
padding-top 0
102-
ul > li
103-
padding-left 1rem
95+
.dropdown-item
96+
h4
97+
border-top 0
98+
margin-top 0
99+
padding-top 0
100+
h4, & > a
101+
font-size 15px
102+
height 2rem
103+
line-height 2rem
104+
.dropdown-subitem
105+
font-size 14px
106+
padding-left 1rem
107+
104108
.sidebar-links
105109
margin-top 1.5rem
106110

0 commit comments

Comments
 (0)