Skip to content

Commit

Permalink
refactor($theme-default): use stylus instead of native css in style t…
Browse files Browse the repository at this point in the history
…ag (#1933)
  • Loading branch information
yoshinorin authored and ulivz committed Oct 11, 2019
1 parent cdbfd75 commit 7c973ab
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 68 deletions.
10 changes: 5 additions & 5 deletions packages/@vuepress/theme-default/components/Page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ export default {
</script>

<style lang="stylus">
@require '../styles/wrapper.styl';
@require '../styles/wrapper.styl'
.page
padding-bottom 2rem
display block
.page {
padding-bottom: 2rem;
display: block;
}
</style>
76 changes: 31 additions & 45 deletions packages/@vuepress/theme-default/components/PageEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,50 +95,36 @@ export default {
}
</script>
<style lang="stylus">
@require '../styles/wrapper.styl';
@require '../styles/wrapper.styl'
.page-edit
@extend $wrapper
padding-top 1rem
padding-bottom 1rem
overflow auto
.edit-link
display inline-block
a
color lighten($textColor, 25%)
margin-right 0.25rem
.last-updated
float right
font-size 0.9em
.prefix
font-weight 500
color lighten($textColor, 25%)
.time
font-weight 400
color #aaa
@media (max-width: $MQMobile)
.page-edit
.edit-link
margin-bottom 0.5rem
.last-updated
font-size 0.8em
float none
text-align left
.page-edit {
@extend $wrapper;
padding-top: 1rem;
padding-bottom: 1rem;
overflow: auto;
.edit-link {
display: inline-block;
a {
color: lighten($textColor, 25%);
margin-right: 0.25rem;
}
}
.last-updated {
float: right;
font-size: 0.9em;
.prefix {
font-weight: 500;
color: lighten($textColor, 25%);
}
.time {
font-weight: 400;
color: #aaa;
}
}
}
@media (max-width: $MQMobile) {
.page-edit {
.edit-link {
margin-bottom: 0.5rem;
}
.last-updated {
font-size: 0.8em;
float: none;
text-align: left;
}
}
}
</style>
32 changes: 14 additions & 18 deletions packages/@vuepress/theme-default/components/PageNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,23 +99,19 @@ function flatten (items, res) {
}
</script>
<style lang="stylus">
@require '../styles/wrapper.styl';
@require '../styles/wrapper.styl'
.page-nav
@extend $wrapper
padding-top 1rem
padding-bottom 0
.inner
min-height 2rem
margin-top 0
border-top 1px solid $borderColor
padding-top 1rem
overflow auto // clear float
.next
float right
.page-nav {
@extend $wrapper;
padding-top: 1rem;
padding-bottom: 0;
.inner {
min-height: 2rem;
margin-top: 0;
border-top: 1px solid $borderColor;
padding-top: 1rem;
overflow: auto; // clear float
}
.next {
float: right;
}
}
</style>

0 comments on commit 7c973ab

Please sign in to comment.