From 7f440d0124e591bd34d15f7fd2d77bf24ef28841 Mon Sep 17 00:00:00 2001
From: ULIVZ <472590061@qq.com>
Date: Mon, 16 Apr 2018 10:07:15 +0800
Subject: [PATCH] style: use more exact class selector, and clean old element
selector code.
---
docs/.vuepress/config.js | 2 +-
lib/default-theme/NavLinks.vue | 22 +++++++++++++---------
lib/default-theme/Sidebar.vue | 24 ++++++++++++++----------
3 files changed, 28 insertions(+), 20 deletions(-)
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index e6955c1044..4efbb5e9b6 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -110,7 +110,7 @@ module.exports = {
items: [
{
text: 'Vue Curated',
- link: 'ttps://curated.vuejs.org/'
+ link: 'https://curated.vuejs.org/'
},
{
text: 'Awesome Vue',
diff --git a/lib/default-theme/NavLinks.vue b/lib/default-theme/NavLinks.vue
index 1092d51b66..ca81cf6d71 100644
--- a/lib/default-theme/NavLinks.vue
+++ b/lib/default-theme/NavLinks.vue
@@ -12,11 +12,13 @@
-
{{ subItem.text }}
-
+
-
@@ -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
@@ -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
diff --git a/lib/default-theme/Sidebar.vue b/lib/default-theme/Sidebar.vue
index 00dd33518a..ad7fad3a90 100644
--- a/lib/default-theme/Sidebar.vue
+++ b/lib/default-theme/Sidebar.vue
@@ -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