Skip to content

Commit

Permalink
style: use more exact class selector, and clean old element selector …
Browse files Browse the repository at this point in the history
…code.
  • Loading branch information
ulivz committed Apr 16, 2018
1 parent 96a6cc6 commit 7f440d0
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
2 changes: 1 addition & 1 deletion docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ module.exports = {
items: [
{
text: 'Vue Curated',
link: 'ttps://curated.vuejs.org/'
link: 'https://curated.vuejs.org/'
},
{
text: 'Awesome Vue',
Expand Down
22 changes: 13 additions & 9 deletions lib/default-theme/NavLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
<span class="arrow"></span>
<ul class="nav-dropdown">
<li
class="dropdown-item"
v-for="subItem in item.items"
:key="subItem.link">
<h4 v-if="subItem.type === 'links'">{{ subItem.text }}</h4>
<ul v-if="subItem.type === 'links'">
<ul class="dropdown-subitem-wrapper" v-if="subItem.type === 'links'">
<li
class="dropdown-subitem"
v-for="childSubItem in subItem.items"
:key="childSubItem.link">
<nav-link :item="childSubItem"></nav-link>
Expand Down Expand Up @@ -100,9 +102,18 @@ export default {
border-right 4px solid transparent
border-top 5px solid #ccc
.nav-dropdown
li
.dropdown-item
color inherit
line-height 1.7rem
h4
margin 0.45rem 0 0
border-top 1px solid #eee
padding 0.45rem 1.5rem 0 1.25rem
.dropdown-subitem-wrapper
padding 0
list-style none
.dropdown-subitem
font-size 0.9em
a
display block
height 1.7rem
Expand Down Expand Up @@ -130,13 +141,6 @@ export default {
margin-top 0
padding-top 0
border-top 0
& > h4
margin 0.45rem 0 0
border-top 1px solid #eee
padding 0.45rem 1.5rem 0 1.25rem
& > ul
padding 0
list-style none
.github-link
margin-left 1.5rem
Expand Down
24 changes: 14 additions & 10 deletions lib/default-theme/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,21 @@ function resolveOpenGroupIndex (route, items) {
.nav-item .dropdown-wrapper
.dropdown-title
display inline-block
margin-bottom 5px
margin-bottom 0.5rem
.nav-dropdown
li, h4
font-size 15px
line-height 1.7rem
h4
border-top 0
margin-top 0
padding-top 0
ul > li
padding-left 1rem
.dropdown-item
h4
border-top 0
margin-top 0
padding-top 0
h4, & > a
font-size 15px
height 2rem
line-height 2rem
.dropdown-subitem
font-size 14px
padding-left 1rem
.sidebar-links
margin-top 1.5rem
Expand Down

0 comments on commit 7f440d0

Please sign in to comment.